Skip to content
Snippets Groups Projects
Unverified Commit 9d5182e8 authored by Shaopeng Wang's avatar Shaopeng Wang Committed by GitHub
Browse files

Fix runtime_benchmarks_instance macro. (#285)


* Fix runtime_benchmarks_instance macro.

Co-authored-by: default avatarzjb0807 <zjb0807@qq.com>
parent 33b39828
No related branches found
No related tags found
No related merge requests found
...@@ -200,7 +200,7 @@ macro_rules! runtime_benchmarks_instance { ...@@ -200,7 +200,7 @@ macro_rules! runtime_benchmarks_instance {
$( $rest:tt )* $( $rest:tt )*
) => { ) => {
$crate::benchmarks_iter!( $crate::benchmarks_iter!(
{ I } { $instance }
$runtime $runtime
$pallet $pallet
{ $( { $common , $common_from , $common_to , $common_instancer } )* } { $( { $common , $common_from , $common_to , $common_instancer } )* }
...@@ -569,7 +569,7 @@ macro_rules! benchmark_backend { ...@@ -569,7 +569,7 @@ macro_rules! benchmark_backend {
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
struct $name; struct $name;
#[allow(unused_variables)] #[allow(unused_variables)]
impl<$( <$instance>, I: Instance)? > $crate::BenchmarkingSetup<$runtime $(, $instance)?> for $name { impl $crate::BenchmarkingSetup<$runtime $(, $instance)?> for $name {
fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> { fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> {
vec! [ vec! [
$( $(
...@@ -652,7 +652,7 @@ macro_rules! selected_benchmark { ...@@ -652,7 +652,7 @@ macro_rules! selected_benchmark {
} }
// Allow us to select a benchmark from the list of available benchmarks. // Allow us to select a benchmark from the list of available benchmarks.
impl<$( <$instance>, I: Instance)? > $crate::BenchmarkingSetup<$runtime $(, $instance)?> for SelectedBenchmark { impl $crate::BenchmarkingSetup<$runtime $(, $instance)?> for SelectedBenchmark {
fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> { fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> {
match self { match self {
$( $(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment