mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
fix: address clippy warnings
This commit is contained in:
@@ -96,9 +96,9 @@ impl Header {
|
||||
}
|
||||
|
||||
fn get_challenge_data(magic_header: &[u8; 0x10]) -> Result<[u8; 0x10], KugouError> {
|
||||
match magic_header {
|
||||
&KGM_HEADER => Ok(KGM_TEST_DATA),
|
||||
&VPR_HEADER => Ok(VPR_TEST_DATA),
|
||||
match *magic_header {
|
||||
KGM_HEADER => Ok(KGM_TEST_DATA),
|
||||
VPR_HEADER => Ok(VPR_TEST_DATA),
|
||||
_ => Err(KugouError::NotKGMFile)?,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ pub struct DecipherV2 {
|
||||
impl DecipherV2 {
|
||||
pub fn new(header: &Header) -> Result<Self, KugouError> {
|
||||
let mut key = [0u8; 4];
|
||||
key.copy_from_slice(get_slot_key(&header)?);
|
||||
key.copy_from_slice(get_slot_key(header)?);
|
||||
Ok(Self { key })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user