From dde1fd26be40e735751f8433b97758741060df17 Mon Sep 17 00:00:00 2001 From: Colin Sherratt Date: Fri, 9 Jan 2015 15:59:43 -0700 Subject: [PATCH] fixed bench macros --- benches/common/macros.rs | 2 +- benches/construction.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benches/common/macros.rs b/benches/common/macros.rs index 2ab9d0a..7c36b75 100644 --- a/benches/common/macros.rs +++ b/benches/common/macros.rs @@ -82,7 +82,7 @@ macro_rules! bench_unop( ); macro_rules! bench_construction( - ($name: ident, $t: ty, $constructor: path $(, $args: ident: $types: ty)*) => { + ($name: ident, $t: ty, $constructor: path [ $($args: ident: $types: ty),+ ]) => { #[bench] fn $name(bh: &mut Bencher) { const LEN: uint = 1 << 13; diff --git a/benches/construction.rs b/benches/construction.rs index c02554e..159562d 100644 --- a/benches/construction.rs +++ b/benches/construction.rs @@ -55,7 +55,7 @@ fn _bench_rot3_from_axisangle(bh: &mut Bencher) { bench_from_axis_angle::>(bh) } -bench_construction!(_bench_rot2_from_axisangle, Basis2, Rotation2::from_angle, angle: Rad); +bench_construction!(_bench_rot2_from_axisangle, Basis2, Rotation2::from_angle [ angle: Rad ]); -bench_construction!(_bench_quat_from_euler_angles, Quaternion, Rotation3::from_euler, roll: Rad, pitch: Rad, yaw: Rad); -bench_construction!(_bench_rot3_from_euler_angles, Basis3, Rotation3::from_euler, roll: Rad, pitch: Rad, yaw: Rad); +bench_construction!(_bench_quat_from_euler_angles, Quaternion, Rotation3::from_euler [roll: Rad, pitch: Rad, yaw: Rad]); +bench_construction!(_bench_rot3_from_euler_angles, Basis3, Rotation3::from_euler [roll: Rad, pitch: Rad, yaw: Rad]);