Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
asiniscalchi committed Oct 9, 2024
1 parent 2aa6faf commit d3bfe03
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xcm-simulator/src/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type BenchmarkHelper = ();
}

/// Simple conversion of `u32` into an `AssetId` for use in benchmarking.
pub struct XcmBenchmarkHelper;
#[cfg(feature = "runtime-benchmarks")]
impl pallet_assets::BenchmarkHelper<xcm::v3::Location> for XcmBenchmarkHelper {
fn create_asset_id_parameter(id: u32) -> xcm::v3::Location {
xcm::v3::Location::new(1, xcm::v3::Junction::Parachain(id))
}
}

/// Assets managed by some foreign location. Note: we do not declare a `ForeignAssetsCall` type, as
/// this type is used in proxy definitions. We assume that a foreign location would not want to set
/// an individual, local account as a proxy for the issuance of their assets. This issuance should
Expand Down Expand Up @@ -352,7 +361,7 @@ impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type AssetAccountDeposit = frame_support::traits::ConstU128<1_000>;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = xcm_config::XcmBenchmarkHelper;
type BenchmarkHelper = XcmBenchmarkHelper;
}

impl parachain_info::Config for Runtime {}
Expand Down

0 comments on commit d3bfe03

Please sign in to comment.