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
+26 -13
View File
@@ -18,9 +18,10 @@
mod common;
mod construct;
#[macro_use] mod core;
mod import;
#[macro_use]
mod core;
mod generator;
mod import;
mod simple_trie;
mod state_sizes;
mod tempdb;
@@ -29,15 +30,15 @@ mod txpool;
use structopt::StructOpt;
use node_testing::bench::{Profile, KeyTypes, BlockType, DatabaseType as BenchDataBaseType};
use node_testing::bench::{BlockType, DatabaseType as BenchDataBaseType, KeyTypes, Profile};
use crate::{
common::SizeType,
core::{run_benchmark, Mode as BenchmarkMode},
tempdb::DatabaseType,
import::ImportBenchmarkDescription,
trie::{TrieReadBenchmarkDescription, TrieWriteBenchmarkDescription, DatabaseSize},
construct::ConstructionBenchmarkDescription,
core::{run_benchmark, Mode as BenchmarkMode},
import::ImportBenchmarkDescription,
tempdb::DatabaseType,
trie::{DatabaseSize, TrieReadBenchmarkDescription, TrieWriteBenchmarkDescription},
txpool::PoolBenchmarkDescription,
};
@@ -92,14 +93,25 @@ fn main() {
SizeType::Large,
SizeType::Full,
SizeType::Custom(opt.transactions.unwrap_or(0)),
].iter() {
]
.iter()
{
for block_type in [
BlockType::RandomTransfersKeepAlive,
BlockType::RandomTransfersReaping,
BlockType::Noop,
].iter() {
for database_type in [BenchDataBaseType::RocksDb, BenchDataBaseType::ParityDb].iter() {
import_benchmarks.push((profile, size.clone(), block_type.clone(), database_type));
]
.iter()
{
for database_type in
[BenchDataBaseType::RocksDb, BenchDataBaseType::ParityDb].iter()
{
import_benchmarks.push((
profile,
size.clone(),
block_type.clone(),
database_type,
));
}
}
}
@@ -163,7 +175,7 @@ fn main() {
println!("{}: {}", benchmark.name(), benchmark.path().full())
}
}
return;
return
}
let mut results = Vec::new();
@@ -183,7 +195,8 @@ fn main() {
}
if opt.json {
let json_result: String = serde_json::to_string(&results).expect("Failed to construct json");
let json_result: String =
serde_json::to_string(&results).expect("Failed to construct json");
println!("{}", json_result);
}
}