mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
[kgm] chore: use Box::new instead of from.
This commit is contained in:
@@ -55,8 +55,8 @@ impl Header {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let decipher: Box<dyn Decipher> = match self.crypto_version {
|
let decipher: Box<dyn Decipher> = match self.crypto_version {
|
||||||
2 => Box::from(DecipherV2::new(self, slot_key)?),
|
2 => Box::new(DecipherV2::new(self, slot_key)?),
|
||||||
3 => Box::from(DecipherV3::new(self, slot_key)?),
|
3 => Box::new(DecipherV3::new(self, slot_key)?),
|
||||||
version => Err(KugouError::UnsupportedCipherVersion(version))?,
|
version => Err(KugouError::UnsupportedCipherVersion(version))?,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user