Skip to content

Commit

Permalink
Benchmark macro: Allow multiple bounds in where (paritytech#8116)
Browse files Browse the repository at this point in the history
  • Loading branch information
weichweich authored Feb 18, 2021
1 parent cd11670 commit 75a2d29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frame/benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ macro_rules! benchmarks_iter {
{ $( $where_clause:tt )* }
( $( $names:tt )* )
( $( $names_extra:tt )* )
where_clause { where $( $where_ty:ty: $where_bound:path ),* $(,)? }
where_clause { where $( $where_bound:tt )* }
$( $rest:tt )*
) => {
$crate::benchmarks_iter! {
{ $( $instance)? }
{ $( $where_ty: $where_bound ),* }
{ $( $where_bound )* }
( $( $names )* )
( $( $names_extra )* )
$( $rest )*
Expand Down
3 changes: 2 additions & 1 deletion frame/benchmarking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ mod benchmarks {
crate::benchmarks!{
where_clause {
where
<T as pallet_test::OtherConfig>::OtherEvent: Into<<T as pallet_test::Config>::Event>
<T as pallet_test::OtherConfig>::OtherEvent: Into<<T as pallet_test::Config>::Event> + Clone,
<T as pallet_test::Config>::Event: Clone,
}

set_value {
Expand Down

0 comments on commit 75a2d29

Please sign in to comment.