fix: address clippy warnings

This commit is contained in:
鲁树人
2025-09-08 20:35:09 +09:00
parent 9ba4eed1ea
commit 2db85a1e9c
12 changed files with 27 additions and 27 deletions

View File

@@ -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)?,
}
}

View File

@@ -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 })
}