diff --git a/src/macros.rs b/src/macros.rs index 4e1583d..091a21e 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -98,7 +98,7 @@ macro_rules! assert_almost_eq { #[macro_export] macro_rules! concatenate { ( $name:ident, $([$estimator:ident, $statistic:ident]),+ ) => { - concatenate!( $name, $([$estimator, $statistic, $statistic]),* ) + concatenate!( $name, $([$estimator, $statistic, $statistic]),* ); }; ( $name:ident, $( [$estimator:ident, $field:ident, $($statistic:ident),+] ),+ ) => { struct $name { diff --git a/tests/macros.rs b/tests/macros.rs index 9d3f7eb..db3b6f6 100644 --- a/tests/macros.rs +++ b/tests/macros.rs @@ -4,14 +4,12 @@ extern crate core; -use average::Estimate; +use average::{Estimate, Min, Max}; + +concatenate!(MinMax, [Min, min], [Max, max]); #[test] fn concatenate_simple() { - use average::{Min, Max}; - - concatenate!(MinMax, [Min, min], [Max, max]); - { let mut s = MinMax::new(); for i in 1..6 {