Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion: Restructure dispatch macro related exports #7663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions runtime/common/src/assigned_slots/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use super::{Config, MaxPermanentSlots, MaxTemporarySlots, Pallet, LOG_TARGET};
use frame_support::{
dispatch::GetStorageVersion,
traits::{Get, OnRuntimeUpgrade},
};
use frame_support::traits::{Get, GetStorageVersion, OnRuntimeUpgrade};

#[cfg(feature = "try-runtime")]
use frame_support::ensure;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ mod benchmarking {
use super::*;
use crate::claims::Call;
use frame_benchmarking::{account, benchmarks};
use frame_support::dispatch::UnfilteredDispatchable;
use frame_support::traits::UnfilteredDispatchable;
use frame_system::RawOrigin;
use secp_utils::*;
use sp_runtime::{traits::ValidateUnsigned, DispatchResult};
Expand Down
3 changes: 1 addition & 2 deletions runtime/common/src/crowdloan/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

use super::*;
use frame_support::{
dispatch::GetStorageVersion,
storage_alias,
traits::{OnRuntimeUpgrade, StorageVersion},
traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion},
Twox64Concat,
};

Expand Down
6 changes: 2 additions & 4 deletions xcm/pallet-xcm-benchmarks/src/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ mod mock;
#[frame_support::pallet]
pub mod pallet {
use frame_benchmarking::BenchmarkError;
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo},
pallet_prelude::Encode,
};
use frame_support::{dispatch::GetDispatchInfo, pallet_prelude::Encode};
use sp_runtime::traits::Dispatchable;
use xcm::latest::{
InteriorMultiLocation, Junction, MultiAsset, MultiAssets, MultiLocation, NetworkId,
Response,
Expand Down
11 changes: 5 additions & 6 deletions xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ use frame_support::traits::{
use scale_info::TypeInfo;
use sp_runtime::{
traits::{
AccountIdConversion, BadOrigin, BlakeTwo256, BlockNumberProvider, Hash, Saturating, Zero,
AccountIdConversion, BadOrigin, BlakeTwo256, BlockNumberProvider, Dispatchable, Hash,
Saturating, Zero,
},
RuntimeDebug,
};
Expand All @@ -43,10 +44,7 @@ use xcm::{latest::QueryResponseInfo, prelude::*};
use xcm_executor::traits::{ConvertOrigin, Properties};

use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo},
pallet_prelude::*,
traits::WithdrawReasons,
PalletId,
dispatch::GetDispatchInfo, pallet_prelude::*, traits::WithdrawReasons, PalletId,
};
use frame_system::pallet_prelude::*;
pub use pallet::*;
Expand Down Expand Up @@ -149,11 +147,12 @@ impl WeightInfo for TestWeightInfo {
pub mod pallet {
use super::*;
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo},
dispatch::{GetDispatchInfo, PostDispatchInfo},
parameter_types,
};
use frame_system::Config as SysConfig;
use sp_core::H256;
use sp_runtime::traits::Dispatchable;
use xcm_executor::traits::{MatchesFungible, WeightBounds};

parameter_types! {
Expand Down
3 changes: 2 additions & 1 deletion xcm/xcm-executor/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ use crate::traits::{
WeightTrader,
};
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo, Parameter, PostDispatchInfo},
dispatch::{GetDispatchInfo, Parameter, PostDispatchInfo},
traits::{Contains, ContainsPair, Get, PalletsInfoAccess},
};
use sp_runtime::traits::Dispatchable;
use xcm::prelude::*;

/// The trait to parameterize the `XcmExecutor`.
Expand Down
6 changes: 2 additions & 4 deletions xcm/xcm-executor/src/traits/on_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

use crate::Xcm;
use core::result;
use frame_support::{
dispatch::fmt::Debug,
pallet_prelude::{Get, TypeInfo},
};
use frame_support::pallet_prelude::{Get, TypeInfo};
use parity_scale_codec::{FullCodec, MaxEncodedLen};
use sp_arithmetic::traits::Zero;
use sp_std::fmt::Debug;
use xcm::latest::{
Error as XcmError, InteriorMultiLocation, MultiLocation, QueryId, Response,
Result as XcmResult, Weight, XcmContext,
Expand Down