make more readable

This commit is contained in:
Robert Habermeier
2018-01-23 19:50:56 +01:00
parent 9b930a18a5
commit e014c8a553
2 changed files with 2 additions and 50 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ macro_rules! environmental {
}
}
};
(trait $name:ident : $t:ident) => {
($name:ident : trait $t:ident) => {
#[allow(non_camel_case_types)]
struct $name { __private_field: () }
@@ -306,7 +306,7 @@ mod tests {
}
}
environmental!(trait sum: Sum);
environmental!(sum: trait Sum);
let numbers = vec![1, 2, 3, 4, 5];
let mut numbers = &numbers[..];
let got_sum = sum::using(&mut numbers, || {