Indent macro body

This commit is contained in:
David Tolnay 2017-09-16 14:12:12 -07:00
parent 34bffe2943
commit 35106024c6
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
1 changed files with 61 additions and 60 deletions

View File

@ -40,7 +40,7 @@ const MAX_LEN: usize = 40; // i128::MIN (including minus sign)
// Adaptation of the original implementation at
// https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L188-L266
macro_rules! impl_Integer {
($($t:ident),* as $conv_fn:ident) => ($(
($($t:ident),* as $conv_fn:ident) => {$(
impl Integer for $t {
fn write<W: io::Write>(self, mut wr: W) -> io::Result<usize> {
let mut buf = unsafe { mem::uninitialized() };
@ -109,7 +109,8 @@ macro_rules! impl_Integer {
let len = buf.len() - curr as usize;
unsafe { slice::from_raw_parts(buf_ptr.offset(curr), len) }
}
})*);
}
)*};
}
impl_Integer!(i8, u8, i16, u16, i32, u32 as u32);