[kgm] chore: use Box::new instead of from.

This commit is contained in:
鲁树人 2024-09-16 20:42:34 +01:00
parent 92a52c1565
commit e011f75d36

View File

@ -55,8 +55,8 @@ impl Header {
};
let decipher: Box<dyn Decipher> = match self.crypto_version {
2 => Box::from(DecipherV2::new(self, slot_key)?),
3 => Box::from(DecipherV3::new(self, slot_key)?),
2 => Box::new(DecipherV2::new(self, slot_key)?),
3 => Box::new(DecipherV3::new(self, slot_key)?),
version => Err(KugouError::UnsupportedCipherVersion(version))?,
};