From 3ea35cc4d91c119bb30869cd01e31baa77b223d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89lo=C3=AFs?= <c@elo.tf>
Date: Wed, 26 Feb 2025 12:50:48 +0100
Subject: [PATCH] rustfmt
---
pallets/distance/src/mock.rs | 13 +++----------
pallets/duniter-wot/src/mock.rs | 13 +++----------
pallets/identity/src/lib.rs | 4 +++-
3 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs
index 5da8d0807..06b89976b 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 b53b5d7a1..e246133a0 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 f4c209cdf..0e00c7e7a 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>;
--
GitLab