diff options
Diffstat (limited to 'data_model/src/endian.rs')
-rw-r--r-- | data_model/src/endian.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/data_model/src/endian.rs b/data_model/src/endian.rs index 97d1b72..82799b8 100644 --- a/data_model/src/endian.rs +++ b/data_model/src/endian.rs @@ -33,7 +33,7 @@ use DataInit; macro_rules! endian_type { - ($old_type:ident, $new_type:ident, $to_new:ident, $from_new:ident) => ( + ($old_type:ident, $new_type:ident, $to_new:ident, $from_new:ident) => { /// An unsigned integer type of with an explicit endianness. /// /// See module level documentation for examples. @@ -72,7 +72,7 @@ macro_rules! endian_type { $new_type($old_type::$to_new(v)) } } - ) + }; } endian_type!(u16, Le16, to_le, from_le); @@ -89,7 +89,7 @@ mod tests { use super::*; use std::convert::From; - use std::mem::{size_of, align_of, transmute}; + use std::mem::{align_of, size_of, transmute}; #[cfg(target_endian = "little")] const NATIVE_LITTLE: bool = true; @@ -98,7 +98,7 @@ mod tests { const NATIVE_BIG: bool = !NATIVE_LITTLE; macro_rules! endian_test { - ($old_type:ty, $new_type:ty, $test_name:ident, $native:expr) => ( + ($old_type:ty, $new_type:ty, $test_name:ident, $native:expr) => { mod $test_name { use super::*; @@ -131,7 +131,7 @@ mod tests { assert!(endian_v == v); } } - ) + }; } endian_test!(u16, Le16, test_le16, NATIVE_LITTLE); |