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
+14 -15
View File
@@ -19,35 +19,35 @@
#![cfg_attr(not(feature = "std"), no_std)]
mod tests;
mod utils;
#[cfg(feature = "std")]
mod analysis;
mod tests;
mod utils;
pub use utils::*;
#[cfg(feature = "std")]
pub use analysis::{Analysis, BenchmarkSelector, RegressionModel, AnalysisChoice};
pub use analysis::{Analysis, AnalysisChoice, BenchmarkSelector, RegressionModel};
#[doc(hidden)]
pub use frame_support;
#[doc(hidden)]
pub use log;
#[doc(hidden)]
pub use paste;
#[doc(hidden)]
pub use sp_io::storage::root as storage_root;
#[doc(hidden)]
pub use sp_runtime::traits::Zero;
#[doc(hidden)]
pub use frame_support;
#[doc(hidden)]
pub use sp_std::{self, vec, prelude::Vec, boxed::Box};
#[doc(hidden)]
pub use paste;
pub use sp_std::{self, boxed::Box, prelude::Vec, vec};
#[doc(hidden)]
pub use sp_storage::TrackedStorageKey;
#[doc(hidden)]
pub use log;
pub use utils::*;
/// Whitelist the given account.
#[macro_export]
macro_rules! whitelist {
($acc:ident) => {
frame_benchmarking::benchmarking::add_to_whitelist(
frame_system::Account::<T>::hashed_key_for(&$acc).into()
frame_system::Account::<T>::hashed_key_for(&$acc).into(),
);
};
}
@@ -1081,7 +1081,6 @@ macro_rules! impl_benchmark_test {
///
/// - It must be the name of a method applied to the output of the `new_test_ext` argument.
/// - That method must have a signature capable of receiving a single argument of the form `impl FnOnce()`.
///
// ## Notes (not for rustdoc)
//
// The biggest challenge for this macro is communicating the actual test functions to be run. We
@@ -1260,9 +1259,9 @@ pub fn show_benchmark_debug_info(
* Verify: {:?}\n\
* Error message: {}",
sp_std::str::from_utf8(instance_string)
.expect("it's all just strings ran through the wasm interface. qed"),
.expect("it's all just strings ran through the wasm interface. qed"),
sp_std::str::from_utf8(benchmark)
.expect("it's all just strings ran through the wasm interface. qed"),
.expect("it's all just strings ran through the wasm interface. qed"),
lowest_range_values,
highest_range_values,
steps,