diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index 5da8d0807246b03d1e56797694cd9009233fd702..06b89976b8ef40c36cb03ad5cf1718a023eeac2a 100644 --- a/pallets/distance/src/mock.rs +++ b/pallets/distance/src/mock.rs @@ -45,14 +45,7 @@ impl From<AccountId32Mock> for u64 { impl From<[u8; 32]> for AccountId32Mock { fn from(bytes: [u8; 32]) -> Self { Self(u64::from_be_bytes([ - bytes[0], - bytes[1], - bytes[2], - bytes[3], - bytes[4], - bytes[5], - bytes[6], - bytes[7] + bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7], ])) } } @@ -72,8 +65,8 @@ impl sp_runtime::traits::Verify for TestSignature { type Signer = UintAuthorityId; fn verify<L: sp_runtime::traits::Lazy<[u8]>>(&self, msg: L, signer: &u64) -> bool { - <SubtrateTestSignature as sp_runtime::traits::Verify>::verify::<L>(&self.0, msg, signer) - } + <SubtrateTestSignature as sp_runtime::traits::Verify>::verify::<L>(&self.0, msg, signer) + } } impl_opaque_keys! { diff --git a/pallets/duniter-wot/src/mock.rs b/pallets/duniter-wot/src/mock.rs index b53b5d7a1bbeb704e47fcf386951749ff6c45729..e246133a0353c68fbeda9c3566dd20b5485de6a1 100644 --- a/pallets/duniter-wot/src/mock.rs +++ b/pallets/duniter-wot/src/mock.rs @@ -39,14 +39,7 @@ impl From<AccountId32Mock> for u64 { impl From<[u8; 32]> for AccountId32Mock { fn from(bytes: [u8; 32]) -> Self { Self(u64::from_be_bytes([ - bytes[0], - bytes[1], - bytes[2], - bytes[3], - bytes[4], - bytes[5], - bytes[6], - bytes[7] + bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7], ])) } } @@ -73,8 +66,8 @@ impl sp_runtime::traits::Verify for TestSignature { type Signer = UintAuthorityId; fn verify<L: sp_runtime::traits::Lazy<[u8]>>(&self, msg: L, signer: &u64) -> bool { - <SubtrateTestSignature as sp_runtime::traits::Verify>::verify::<L>(&self.0, msg, signer) - } + <SubtrateTestSignature as sp_runtime::traits::Verify>::verify::<L>(&self.0, msg, signer) + } } // Configure a mock runtime to test the pallet. diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index f4c209cdfffe6a80977be8c8b76c81468eedd7fd..0e00c7e7a061ca8d70c7c716dddc116d3a045802 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -176,7 +176,9 @@ pub mod pallet { type Signer: IdentifyAccount<AccountId = Self::AccountId>; /// Signature type for payload verification. - type Signature: Parameter + Verify<Signer = Self::Signer> + From<sp_core::ed25519::Signature>; + type Signature: Parameter + + Verify<Signer = Self::Signer> + + From<sp_core::ed25519::Signature>; /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;