From 019b2aff08a6d707ab2a8bbfd374f68f42963560 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 13 Sep 2022 23:48:17 +0800 Subject: [PATCH] Companion for paritytech/substrate#12219 (#5987) * Companion for paritytech/substrate#12219 * Fixes * update lockfile for {"substrate"} * Fixes * cargo fmt Co-authored-by: parity-processbot <> --- polkadot/runtime/common/src/auctions.rs | 2 +- polkadot/runtime/common/src/claims.rs | 3 +-- polkadot/runtime/common/src/impls.rs | 5 +---- polkadot/runtime/common/src/lib.rs | 2 +- polkadot/runtime/kusama/src/tests.rs | 2 +- polkadot/runtime/polkadot/src/lib.rs | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index cd8dc35352..b71f0ea387 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -80,7 +80,7 @@ type WinnersData = #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::{pallet_prelude::*, traits::EnsureOrigin, weights::DispatchClass}; + use frame_support::{dispatch::DispatchClass, pallet_prelude::*, traits::EnsureOrigin}; use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; #[pallet::pallet] diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index 8c8ff4b35f..1f92f45535 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -715,10 +715,9 @@ mod tests { use claims::Call as ClaimsCall; use frame_support::{ assert_err, assert_noop, assert_ok, - dispatch::DispatchError::BadOrigin, + dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays}, ord_parameter_types, parameter_types, traits::{ExistenceRequirement, GenesisBuild}, - weights::{GetDispatchInfo, Pays}, }; use pallet_balances; use sp_runtime::{ diff --git a/polkadot/runtime/common/src/impls.rs b/polkadot/runtime/common/src/impls.rs index f165f238ee..f8675143e2 100644 --- a/polkadot/runtime/common/src/impls.rs +++ b/polkadot/runtime/common/src/impls.rs @@ -61,10 +61,7 @@ where mod tests { use super::*; use frame_support::{ - parameter_types, - traits::FindAuthor, - weights::{DispatchClass, Weight}, - PalletId, + dispatch::DispatchClass, parameter_types, traits::FindAuthor, weights::Weight, PalletId, }; use frame_system::limits; use primitives::v2::AccountId; diff --git a/polkadot/runtime/common/src/lib.rs b/polkadot/runtime/common/src/lib.rs index 24ed3b90d9..7673457828 100644 --- a/polkadot/runtime/common/src/lib.rs +++ b/polkadot/runtime/common/src/lib.rs @@ -103,7 +103,7 @@ pub type SlowAdjustingFeeUpdate = #[macro_export] macro_rules! impl_runtime_weights { ($runtime:ident) => { - use frame_support::weights::{DispatchClass, Weight}; + use frame_support::{dispatch::DispatchClass, weights::Weight}; use frame_system::limits; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; pub use runtime_common::{ diff --git a/polkadot/runtime/kusama/src/tests.rs b/polkadot/runtime/kusama/src/tests.rs index a4dbe15681..12d02da131 100644 --- a/polkadot/runtime/kusama/src/tests.rs +++ b/polkadot/runtime/kusama/src/tests.rs @@ -17,7 +17,7 @@ //! Tests for the Kusama Runtime Configuration use crate::*; -use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT}; +use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; use keyring::Sr25519Keyring::Charlie; use pallet_transaction_payment::Multiplier; use parity_scale_codec::Encode; diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 24f64c649c..89f0e94baa 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -2034,7 +2034,7 @@ sp_api::impl_runtime_apis! { #[cfg(test)] mod test_fees { use super::*; - use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT}; + use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; use keyring::Sr25519Keyring::{Alice, Charlie}; use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier;