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