mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 23:38:00 +00:00
Remove clippy workaround (#14424)
This commit is contained in:
@@ -30,7 +30,4 @@ rustflags = [
|
||||
"-Aclippy::derivable_impls", # false positives
|
||||
"-Aclippy::stable_sort_primitive", # prefer stable sort
|
||||
"-Aclippy::extra-unused-type-parameters", # stylistic
|
||||
"-Aclippy::let_with_type_underscore" # used as a workaround for an infinite macro expansion loop in clippy
|
||||
# specifying this as an attribute directly in the affected macro
|
||||
# triggers other weird rust 1.70 bugs
|
||||
]
|
||||
|
||||
@@ -144,7 +144,7 @@ benchmarks_instance_pallet! {
|
||||
let caller = T::CreateOrigin::ensure_origin(origin.clone(), &asset_id.into()).unwrap();
|
||||
let caller_lookup = T::Lookup::unlookup(caller.clone());
|
||||
T::Currency::make_free_balance_be(&caller, DepositBalanceOf::<T, I>::max_value());
|
||||
}: _<T::RuntimeOrigin>(origin, asset_id.clone(), caller_lookup, 1u32.into())
|
||||
}: _<T::RuntimeOrigin>(origin, asset_id, caller_lookup, 1u32.into())
|
||||
verify {
|
||||
assert_last_event::<T, I>(Event::Created { asset_id: asset_id.into(), creator: caller.clone(), owner: caller }.into());
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ macro_rules! benchmark_backend {
|
||||
{ $( PRE { $( $pre_parsed:tt )* } )* }
|
||||
{ $eval:block }
|
||||
{
|
||||
let $pre_id:tt : $pre_ty:ty = $pre_ex:expr;
|
||||
let $pre_id:tt $( : $pre_ty:ty )? = $pre_ex:expr;
|
||||
$( $rest:tt )*
|
||||
}
|
||||
$postcode:block
|
||||
@@ -672,7 +672,7 @@ macro_rules! benchmark_backend {
|
||||
{ $( $where_clause )* }
|
||||
{
|
||||
$( PRE { $( $pre_parsed )* } )*
|
||||
PRE { $pre_id , $pre_ty , $pre_ex }
|
||||
PRE { $pre_id , $( $pre_ty , )? $pre_ex }
|
||||
}
|
||||
{ $eval }
|
||||
{ $( $rest )* }
|
||||
@@ -756,39 +756,13 @@ macro_rules! benchmark_backend {
|
||||
$postcode
|
||||
}
|
||||
};
|
||||
// mutation arm to look after `let _ =`
|
||||
(
|
||||
{ $( $instance:ident: $instance_bound:tt )? }
|
||||
$name:ident
|
||||
{ $( $where_clause:tt )* }
|
||||
{ $( $parsed:tt )* }
|
||||
{ $eval:block }
|
||||
{
|
||||
let $pre_id:tt = $pre_ex:expr;
|
||||
$( $rest:tt )*
|
||||
}
|
||||
$postcode:block
|
||||
) => {
|
||||
$crate::benchmark_backend! {
|
||||
{ $( $instance: $instance_bound )? }
|
||||
$name
|
||||
{ $( $where_clause )* }
|
||||
{ $( $parsed )* }
|
||||
{ $eval }
|
||||
{
|
||||
let $pre_id : _ = $pre_ex;
|
||||
$( $rest )*
|
||||
}
|
||||
$postcode
|
||||
}
|
||||
};
|
||||
// actioning arm
|
||||
(
|
||||
{ $( $instance:ident: $instance_bound:tt )? }
|
||||
$name:ident
|
||||
{ $( $where_clause:tt )* }
|
||||
{
|
||||
$( PRE { $pre_id:tt , $pre_ty:ty , $pre_ex:expr } )*
|
||||
$( PRE { $pre_id:tt , $( $pre_ty:ty , )? $pre_ex:expr } )*
|
||||
$( PARAM { $param:ident , $param_from:expr , $param_to:expr , $param_instancer:expr } )*
|
||||
}
|
||||
{ $eval:block }
|
||||
@@ -823,7 +797,7 @@ macro_rules! benchmark_backend {
|
||||
.1;
|
||||
)*
|
||||
$(
|
||||
let $pre_id : $pre_ty = $pre_ex;
|
||||
let $pre_id $( : $pre_ty )? = $pre_ex;
|
||||
)*
|
||||
$( $param_instancer ; )*
|
||||
$( $post )*
|
||||
|
||||
@@ -680,9 +680,9 @@ benchmarks_instance_pallet! {
|
||||
let buyer_lookup = T::Lookup::unlookup(buyer.clone());
|
||||
let price = ItemPrice::<T, I>::from(0u32);
|
||||
let origin = SystemOrigin::Signed(seller.clone()).into();
|
||||
Nfts::<T, I>::set_price(origin, collection, item, Some(price.clone()), Some(buyer_lookup))?;
|
||||
Nfts::<T, I>::set_price(origin, collection, item, Some(price), Some(buyer_lookup))?;
|
||||
T::Currency::make_free_balance_be(&buyer, DepositBalanceOf::<T, I>::max_value());
|
||||
}: _(SystemOrigin::Signed(buyer.clone()), collection, item, price.clone())
|
||||
}: _(SystemOrigin::Signed(buyer.clone()), collection, item, price)
|
||||
verify {
|
||||
assert_last_event::<T, I>(Event::ItemBought {
|
||||
collection,
|
||||
|
||||
Reference in New Issue
Block a user