mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 01:01:03 +00:00
Remove the Copy bound on AssetId (#14158)
* Remove the `Copy` bound on `AssetId` * Also relax the `Copy` bound in the assets pallet * Fix warnings on the newest nightly Rust * Remove some unnecessary `clone()`s * Try to satisfy clippy * Remove some more unnecessary `clone()`s * Add more `.clone()`s for newly merged code * Also add `clone()`s in the benchmarks --------- Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -38,7 +38,7 @@ mod benchmarks {
|
||||
fn create() -> Result<(), BenchmarkError> {
|
||||
let asset_id: T::AssetId = ASSET_ID.into();
|
||||
#[extrinsic_call]
|
||||
_(RawOrigin::Root, asset_id, default_conversion_rate());
|
||||
_(RawOrigin::Root, asset_id.clone(), default_conversion_rate());
|
||||
|
||||
assert_eq!(
|
||||
pallet_asset_rate::ConversionRateToNative::<T>::get(asset_id),
|
||||
@@ -52,12 +52,12 @@ mod benchmarks {
|
||||
let asset_id: T::AssetId = ASSET_ID.into();
|
||||
assert_ok!(AssetRate::<T>::create(
|
||||
RawOrigin::Root.into(),
|
||||
asset_id,
|
||||
asset_id.clone(),
|
||||
default_conversion_rate()
|
||||
));
|
||||
|
||||
#[extrinsic_call]
|
||||
_(RawOrigin::Root, asset_id, FixedU128::from_u32(2));
|
||||
_(RawOrigin::Root, asset_id.clone(), FixedU128::from_u32(2));
|
||||
|
||||
assert_eq!(
|
||||
pallet_asset_rate::ConversionRateToNative::<T>::get(asset_id),
|
||||
@@ -76,7 +76,7 @@ mod benchmarks {
|
||||
));
|
||||
|
||||
#[extrinsic_call]
|
||||
_(RawOrigin::Root, asset_id);
|
||||
_(RawOrigin::Root, asset_id.clone());
|
||||
|
||||
assert!(pallet_asset_rate::ConversionRateToNative::<T>::get(asset_id).is_none());
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user