From e011f75d3680c8a750413cad2c76b25afebeed5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Mon, 16 Sep 2024 20:42:34 +0100 Subject: [PATCH] [kgm] chore: use `Box::new` instead of `from`. --- um_crypto/kgm/src/header.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/um_crypto/kgm/src/header.rs b/um_crypto/kgm/src/header.rs index b1ef1eb..db78a1e 100644 --- a/um_crypto/kgm/src/header.rs +++ b/um_crypto/kgm/src/header.rs @@ -55,8 +55,8 @@ impl Header { }; let decipher: Box = 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))?, };