@@ -10,18 +10,18 @@ use std::ops::{Add, Mul, Sub};
10
10
macro_rules! assert_equal_len {
11
11
// The `tt` (token tree) designator is used for
12
12
// operators and tokens.
13
- ($a:ident, $b:ident, $func:ident, $op:tt) => (
13
+ ($a:ident, $b:ident, $func:ident, $op:tt) => {
14
14
assert!($a.len() == $b.len(),
15
15
"{:?}: dimension mismatch: {:?} {:?} {:?}",
16
16
stringify!($func),
17
17
($a.len(),),
18
18
stringify!($op),
19
19
($b.len(),));
20
- )
20
+ };
21
21
}
22
22
23
23
macro_rules! op {
24
- ($func:ident, $bound:ident, $op:tt, $method:ident) => (
24
+ ($func:ident, $bound:ident, $op:tt, $method:ident) => {
25
25
fn $func<T: $bound<T, Output=T> + Copy>(xs: &mut Vec<T>, ys: &Vec<T>) {
26
26
assert_equal_len!(xs, ys, $func, $op);
27
27
@@ -30,7 +30,7 @@ macro_rules! op {
30
30
// *x = x.$method(*y);
31
31
}
32
32
}
33
- )
33
+ };
34
34
}
35
35
36
36
// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.
@@ -54,7 +54,7 @@ mod test {
54
54
assert_eq!(x, z);
55
55
}
56
56
}
57
- }
57
+ };
58
58
}
59
59
60
60
// Test `add_assign`, `mul_assign`, and `sub_assign`.
0 commit comments