Run cargo fmt on the whole code base (#9394)

* Run cargo fmt on the whole code base

* Second run

* Add CI check

* Fix compilation

* More unnecessary braces

* Handle weights

* Use --all

* Use correct attributes...

* Fix UI tests

* AHHHHHHHHH

* 🤦

* Docs

* Fix compilation

* 🤷

* Please stop

* 🤦 x 2

* More

* make rustfmt.toml consistent with polkadot

Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Bastian Köcher
2021-07-21 16:32:32 +02:00
committed by GitHub
parent d451c38c1c
commit 7b56ab15b4
1010 changed files with 53339 additions and 51208 deletions
@@ -19,13 +19,13 @@
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Encode, Decode};
use codec::{Decode, Encode};
use sp_application_crypto::sr25519;
pub use sp_application_crypto;
use sp_application_crypto::sr25519;
pub use sp_core::{hash::H256, RuntimeDebug};
use sp_runtime::traits::{BlakeTwo256, Verify, Extrinsic as ExtrinsicT,};
use sp_runtime::traits::{BlakeTwo256, Extrinsic as ExtrinsicT, Verify};
/// Extrinsic for test-runtime.
#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)]
@@ -37,7 +37,10 @@ pub enum Extrinsic {
#[cfg(feature = "std")]
impl serde::Serialize for Extrinsic {
fn serialize<S>(&self, seq: S) -> Result<S::Ok, S::Error> where S: ::serde::Serializer {
fn serialize<S>(&self, seq: S) -> Result<S::Ok, S::Error>
where
S: ::serde::Serializer,
{
self.using_encoded(|bytes| seq.serialize_bytes(bytes))
}
}
@@ -80,8 +83,5 @@ pub type Header = sp_runtime::generic::Header<BlockNumber, BlakeTwo256>;
/// Changes trie configuration (optionally) used in tests.
pub fn changes_trie_config() -> sp_core::ChangesTrieConfiguration {
sp_core::ChangesTrieConfiguration {
digest_interval: 4,
digest_levels: 2,
}
sp_core::ChangesTrieConfiguration { digest_interval: 4, digest_levels: 2 }
}