difftreelog
style fix unused imports
in: master
2 files changed
.maintain/frame-weight-template.hbsdiffbeforeafterboth1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for {{pallet}}4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}6//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`7//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}89// Executed Command:10{{#each args as |arg|~}}11// {{arg}}12{{/each}}1314#![cfg_attr(rustfmt, rustfmt_skip)]15#![allow(unused_parens)]16#![allow(unused_imports)]1718use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};19use sp_std::marker::PhantomData;2021/// Weight functions needed for {{pallet}}.22pub trait WeightInfo {23 {{~#each benchmarks as |benchmark|}}24 fn {{benchmark.name~}}25 (26 {{~#each benchmark.components as |c| ~}}27 {{c.name}}: u32, {{/each~}}28 ) -> Weight;29 {{~/each}}30}3132/// Weights for {{pallet}} using the Substrate node and recommended hardware.33pub struct SubstrateWeight<T>(PhantomData<T>);34impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {35 {{~#each benchmarks as |benchmark|}}36 {{~#each benchmark.comments as |comment|}}37 // {{comment}}38 {{~/each}}39 fn {{benchmark.name~}}40 (41 {{~#each benchmark.components as |c| ~}}42 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}43 ) -> Weight {44 ({{underscore benchmark.base_weight}} as Weight)45 {{~#each benchmark.component_weight as |cw|}}46 // Standard Error: {{underscore cw.error}}47 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))48 {{~/each}}49 {{~#if (ne benchmark.base_reads "0")}}50 .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))51 {{~/if}}52 {{~#each benchmark.component_reads as |cr|}}53 .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))54 {{~/each}}55 {{~#if (ne benchmark.base_writes "0")}}56 .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))57 {{~/if}}58 {{~#each benchmark.component_writes as |cw|}}59 .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))60 {{~/each}}61 }62 {{~/each}}63}6465// For backwards compatibility and tests66impl WeightInfo for () {67 {{~#each benchmarks as |benchmark|}}68 {{~#each benchmark.comments as |comment|}}69 // {{comment}}70 {{~/each}}71 fn {{benchmark.name~}}72 (73 {{~#each benchmark.components as |c| ~}}74 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}75 ) -> Weight {76 ({{underscore benchmark.base_weight}} as Weight)77 {{~#each benchmark.component_weight as |cw|}}78 // Standard Error: {{underscore cw.error}}79 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))80 {{~/each}}81 {{~#if (ne benchmark.base_reads "0")}}82 .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))83 {{~/if}}84 {{~#each benchmark.component_reads as |cr|}}85 .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))86 {{~/each}}87 {{~#if (ne benchmark.base_writes "0")}}88 .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))89 {{~/if}}90 {{~#each benchmark.component_writes as |cw|}}91 .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))92 {{~/each}}93 }94 {{~/each}}95}1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for {{pallet}}4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}6//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`7//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}89// Executed Command:10{{#each args as |arg|~}}11// {{arg}}12{{/each}}1314#![cfg_attr(rustfmt, rustfmt_skip)]15#![allow(unused_parens)]16#![allow(unused_imports)]1718use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};19use sp_std::marker::PhantomData;2021/// Weight functions needed for {{pallet}}.22pub trait WeightInfo {23 {{~#each benchmarks as |benchmark|}}24 fn {{benchmark.name~}}25 (26 {{~#each benchmark.components as |c| ~}}27 {{c.name}}: u32, {{/each~}}28 ) -> Weight;29 {{~/each}}30}3132/// Weights for {{pallet}} using the Substrate node and recommended hardware.33pub struct SubstrateWeight<T>(PhantomData<T>);34impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {35 {{~#each benchmarks as |benchmark|}}36 {{~#each benchmark.comments as |comment|}}37 // {{comment}}38 {{~/each}}39 fn {{benchmark.name~}}40 (41 {{~#each benchmark.components as |c| ~}}42 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}43 ) -> Weight {44 ({{underscore benchmark.base_weight}} as Weight)45 {{~#each benchmark.component_weight as |cw|}}46 // Standard Error: {{underscore cw.error}}47 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))48 {{~/each}}49 {{~#if (ne benchmark.base_reads "0")}}50 .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))51 {{~/if}}52 {{~#each benchmark.component_reads as |cr|}}53 .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))54 {{~/each}}55 {{~#if (ne benchmark.base_writes "0")}}56 .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))57 {{~/if}}58 {{~#each benchmark.component_writes as |cw|}}59 .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))60 {{~/each}}61 }62 {{~/each}}63}6465// For backwards compatibility and tests66impl WeightInfo for () {67 {{~#each benchmarks as |benchmark|}}68 {{~#each benchmark.comments as |comment|}}69 // {{comment}}70 {{~/each}}71 fn {{benchmark.name~}}72 (73 {{~#each benchmark.components as |c| ~}}74 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}75 ) -> Weight {76 ({{underscore benchmark.base_weight}} as Weight)77 {{~#each benchmark.component_weight as |cw|}}78 // Standard Error: {{underscore cw.error}}79 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))80 {{~/each}}81 {{~#if (ne benchmark.base_reads "0")}}82 .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))83 {{~/if}}84 {{~#each benchmark.component_reads as |cr|}}85 .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))86 {{~/each}}87 {{~#if (ne benchmark.base_writes "0")}}88 .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))89 {{~/if}}90 {{~#each benchmark.component_writes as |cw|}}91 .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))92 {{~/each}}93 }94 {{~/each}}95}pallets/inflation/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/inflation/src/benchmarking.rs
+++ b/pallets/inflation/src/benchmarking.rs
@@ -3,8 +3,6 @@
use super::*;
use crate::Module as Inflation;
-use sp_std::prelude::*;
-use frame_system::RawOrigin;
use frame_benchmarking::{benchmarks};
use frame_support::traits::OnInitialize;