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
@@ -20,17 +20,14 @@
#![cfg(test)]
use super::*;
use frame_support::{
parameter_types,
weights::constants::WEIGHT_PER_SECOND,
};
use frame_system as system;
use sp_runtime::{
traits::IdentityLookup,
testing::{Header, UintAuthorityId},
};
use frame_election_provider_support::onchain;
use frame_support::{parameter_types, weights::constants::WEIGHT_PER_SECOND};
use frame_system as system;
use pallet_session::historical as pallet_session_historical;
use sp_runtime::{
testing::{Header, UintAuthorityId},
traits::IdentityLookup,
};
type AccountId = u64;
type AccountIndex = u32;
@@ -112,7 +109,8 @@ impl pallet_session::SessionHandler<AccountId> for TestSessionHandler {
_: bool,
_: &[(AccountId, Ks)],
_: &[(AccountId, Ks)],
) {}
) {
}
fn on_disabled(_: usize) {}
}
@@ -198,7 +196,10 @@ impl pallet_offences::Config for Test {
type OnOffenceHandler = Staking;
}
impl<T> frame_system::offchain::SendTransactionTypes<T> for Test where Call: From<T> {
impl<T> frame_system::offchain::SendTransactionTypes<T> for Test
where
Call: From<T>,
{
type Extrinsic = Extrinsic;
type OverarchingCall = Call;
}