cargo fmt with stable defaults (#876)

This commit is contained in:
James Wilson
2023-03-21 16:53:47 +00:00
committed by GitHub
parent c63ff6ec6d
commit 7c252fccf7
110 changed files with 663 additions and 1949 deletions
+8 -30
View File
@@ -5,32 +5,14 @@
//! Substrate specific configuration
use super::{
extrinsic_params::{
BaseExtrinsicParams,
BaseExtrinsicParamsBuilder,
},
Config,
Hasher,
Header,
};
use codec::{
Decode,
Encode,
};
use serde::{
Deserialize,
Serialize,
extrinsic_params::{BaseExtrinsicParams, BaseExtrinsicParamsBuilder},
Config, Hasher, Header,
};
use codec::{Decode, Encode};
use serde::{Deserialize, Serialize};
pub use crate::utils::{
AccountId32,
MultiAddress,
MultiSignature,
};
pub use primitive_types::{
H256,
U256,
};
pub use crate::utils::{AccountId32, MultiAddress, MultiSignature};
pub use primitive_types::{H256, U256};
/// Default set of commonly used types by Substrate runtimes.
// Note: We only use this at the type level, so it should be impossible to
@@ -137,9 +119,7 @@ where
}
/// Generic header digest. From `sp_runtime::generic::digest`.
#[derive(
Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default,
)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default)]
pub struct Digest {
/// A list of digest items.
pub logs: Vec<DigestItem>,
@@ -240,9 +220,7 @@ impl Decode for DigestItem {
Ok(Self::Seal(vals.0, vals.1))
}
DigestItemType::Other => Ok(Self::Other(Decode::decode(input)?)),
DigestItemType::RuntimeEnvironmentUpdated => {
Ok(Self::RuntimeEnvironmentUpdated)
}
DigestItemType::RuntimeEnvironmentUpdated => Ok(Self::RuntimeEnvironmentUpdated),
}
}
}