Skip to content

Commit 366f482

Browse files
committed
fix: remove unused imports and clean up lint warnings in xcm_config.rs and xcm_queue.rs
1 parent bfbc802 commit 366f482

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

runtime/frequency/src/xcm_config.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
use crate::{
2-
AccountId, AllPalletsWithSystem, Balances, CumulusXcm, ParachainInfo, ParachainSystem,
3-
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue,
2+
AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm,
3+
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue,
44
};
5+
// TODO: To fix lint these were removed. Determine if the following imports are necessary:
6+
// CulumusXcm
57

68
use staging_xcm_builder::{
79
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
810
DenyRecursively, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin,
9-
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsConcrete,
10-
IsParentsOnly, MatchedConvertedConcreteId, NativeAsset, NoChecking, ParentIsPreset,
11-
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
11+
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, IsConcrete, NativeAsset,
12+
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
1213
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
1314
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
1415
};
16+
// TODO: To fix lint these were removed. Determine if the following imports are necessary:
17+
// FungiblesAdapter, IsParentsOnly, MatchedConvertedConcreteId, NoChecking
1518

1619
use polkadot_parachain_primitives::primitives::Sibling;
1720

1821
use frame_support::{
1922
pallet_prelude::Get,
2023
parameter_types,
21-
traits::{ConstU32, ConstU8, Contains, ContainsPair, Disabled, Everything, Nothing},
24+
traits::{ConstU32, Contains, ContainsPair, Disabled, Everything, Nothing},
2225
weights::Weight,
2326
};
27+
// TODO: To fix lint these were removed. Determine if the following imports are necessary:
28+
// ConstU8
2429

2530
pub use common_runtime::fee::WeightToFee;
2631

@@ -49,7 +54,7 @@ parameter_types! {
4954
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
5055
// For the real deployment, it is recommended to set `RelayNetwork` according to the relay chain
5156
// and prepend `UniversalLocation` with `GlobalConsensus(RelayNetwork::get())`.
52-
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into()).into()].into();
57+
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into();
5358
pub HereLocation: Location = Location::here();
5459
}
5560

runtime/frequency/src/xcm_queue.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// use crate::{MessageQueue, ParachainSystem, RuntimeBlockWeights, RuntimeCall, RuntimeEvent};
22
// use crate::{ParachainSystem, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, AccountId, RuntimeOrigin, Runtime};
33
use crate::{
4-
AccountId, MessageQueue, ParachainSystem, Runtime, RuntimeBlockWeights, RuntimeCall,
5-
RuntimeEvent, RuntimeOrigin, XcmpQueue,
4+
AccountId, MessageQueue, ParachainSystem, Runtime, RuntimeBlockWeights, RuntimeEvent,
5+
RuntimeOrigin, XcmpQueue,
66
};
7+
// TODO: To fix lint these were removed. Determine if the following imports are necessary:
8+
// RuntimeCall
79
use frame_support::{
810
parameter_types,
911
traits::{ConstU32, TransformOrigin},
@@ -24,6 +26,7 @@ use staging_xcm_builder::{
2426
};
2527

2628
// use xcm_config;
29+
#[cfg(not(feature = "runtime-benchmarks"))]
2730
use crate::xcm_config;
2831

2932
use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery;
@@ -34,6 +37,7 @@ use staging_xcm::latest::prelude::*;
3437

3538
use pallet_xcm::XcmPassthrough;
3639

40+
#[cfg(not(feature = "runtime-benchmarks"))]
3741
use xcm_executor;
3842

3943
parameter_types! {

0 commit comments

Comments
 (0)