From a387f4459376686b788024af15962df999dccf9c Mon Sep 17 00:00:00 2001 From: Linwei Shang Date: Mon, 16 Sep 2024 15:31:53 -0400 Subject: [PATCH] clippy --- .../api/management_canister/schnorr/types.rs | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ic-cdk/src/api/management_canister/schnorr/types.rs b/src/ic-cdk/src/api/management_canister/schnorr/types.rs index 3655ee7f..6760b909 100644 --- a/src/ic-cdk/src/api/management_canister/schnorr/types.rs +++ b/src/ic-cdk/src/api/management_canister/schnorr/types.rs @@ -62,19 +62,25 @@ pub struct SchnorrKeyId { /// Schnorr Algorithm. #[derive( - CandidType, Serialize, Deserialize, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, + CandidType, + Serialize, + Deserialize, + Debug, + PartialEq, + Eq, + PartialOrd, + Ord, + Hash, + Clone, + Copy, + Default, )] pub enum SchnorrAlgorithm { /// BIP-340 secp256k1. #[serde(rename = "bip340secp256k1")] + #[default] Bip340secp256k1, /// ed25519. #[serde(rename = "ed25519")] Ed25519, } - -impl Default for SchnorrAlgorithm { - fn default() -> Self { - SchnorrAlgorithm::Bip340secp256k1 - } -}