From a0544cefb1b4ba05b0cc8ba871d270a76c174053 Mon Sep 17 00:00:00 2001 From: Peter White Date: Tue, 27 Aug 2024 22:40:21 -0600 Subject: [PATCH] style: fmt --- node/src/command.rs | 20 ++++++++------------ runtime/mainnet/src/lib.rs | 8 ++++---- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index a1bb41f21..0b82edef2 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -72,13 +72,11 @@ impl RuntimeResolver for PathBuf { fn load_spec(id: &str) -> std::result::Result, String> { Ok(match id { - "dev" | "devnet" | "dev-paseo" => { - Box::new(chain_spec::development_config(Relay::PaseoLocal)) - }, + "dev" | "devnet" | "dev-paseo" => + Box::new(chain_spec::development_config(Relay::PaseoLocal)), "test" | "testnet" | "pop-paseo" => Box::new(chain_spec::testnet_config(Relay::Paseo)), - "pop-network" | "pop" | "pop-polkadot" | "mainnet" => { - Box::new(chain_spec::mainnet_config(Relay::Polkadot)) - }, + "pop-network" | "pop" | "pop-polkadot" | "mainnet" => + Box::new(chain_spec::mainnet_config(Relay::Polkadot)), "" | "local" => Box::new(chain_spec::development_config(Relay::PaseoLocal)), path => { let path: PathBuf = path.into(); @@ -285,7 +283,7 @@ pub fn run() -> Result<()> { let runner = cli.create_runner(cmd)?; // Switch on the concrete benchmark sub-command- match cmd { - BenchmarkCmd::Pallet(cmd) => { + BenchmarkCmd::Pallet(cmd) => if cfg!(feature = "runtime-benchmarks") { runner.sync_run(|config| { cmd.run_with_spec::, ReclaimHostFunctions>(Some( @@ -296,8 +294,7 @@ pub fn run() -> Result<()> { Err("Benchmarking wasn't enabled when building the node. You can enable \ it with `--features runtime-benchmarks`." .into()) - } - }, + }, BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { construct_benchmark_partials!(config, |partials| cmd.run(partials.client)) }), @@ -314,9 +311,8 @@ pub fn run() -> Result<()> { cmd.run(config, partials.client.clone(), db, storage) }) }), - BenchmarkCmd::Machine(cmd) => { - runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())) - }, + BenchmarkCmd::Machine(cmd) => + runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())), // NOTE: this allows the Client to leniently implement // new benchmark commands without requiring a companion MR. #[allow(unreachable_patterns)] diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index 604713861..3c1bfe8ec 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -239,10 +239,10 @@ impl Contains for FilteredCalls { matches!( c, RuntimeCall::Balances( - force_adjust_total_issuance { .. } - | force_set_balance { .. } - | force_transfer { .. } - | force_unreserve { .. } + force_adjust_total_issuance { .. } | + force_set_balance { .. } | + force_transfer { .. } | + force_unreserve { .. } ) ) }