fmt
This commit is contained in:
parent
a2a7254a48
commit
0642db9baa
|
@ -227,8 +227,8 @@ macro_rules! impl_fmt {
|
||||||
)* };
|
)* };
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_fmt!{ FixedU8(U8) FixedU16(U16) FixedU32(U32) FixedU64(U64) FixedU128(U128) }
|
impl_fmt! { FixedU8(U8) FixedU16(U16) FixedU32(U32) FixedU64(U64) FixedU128(U128) }
|
||||||
impl_fmt!{ FixedI8(U8) FixedI16(U16) FixedI32(U32) FixedI64(U64) FixedI128(U128) }
|
impl_fmt! { FixedI8(U8) FixedI16(U16) FixedI32(U32) FixedI64(U64) FixedI128(U128) }
|
||||||
|
|
||||||
fn dec_int_digits(int_bits: u32) -> u32 {
|
fn dec_int_digits(int_bits: u32) -> u32 {
|
||||||
assert!(int_bits < 299);
|
assert!(int_bits < 299);
|
||||||
|
|
|
@ -83,7 +83,7 @@ macro_rules! div_half {
|
||||||
)* };
|
)* };
|
||||||
}
|
}
|
||||||
|
|
||||||
div_half!{ u8: 8, u16: 16, u32: 32, u64: 64, u128: 128 }
|
div_half! { u8: 8, u16: 16, u32: 32, u64: 64, u128: 128 }
|
||||||
|
|
||||||
trait NegAbs {
|
trait NegAbs {
|
||||||
type Abs;
|
type Abs;
|
||||||
|
@ -145,7 +145,7 @@ macro_rules! neg_abs {
|
||||||
)* };
|
)* };
|
||||||
}
|
}
|
||||||
|
|
||||||
neg_abs!{ i8: u8, i16: u16, i32: u32, i64: u64, i128: u128 }
|
neg_abs! { i8: u8, i16: u16, i32: u32, i64: u64, i128: u128 }
|
||||||
|
|
||||||
pub trait WideDivRem<U>: Sized {
|
pub trait WideDivRem<U>: Sized {
|
||||||
fn div_rem_from(self, dividend: (Self, U)) -> ((Self, U), Self);
|
fn div_rem_from(self, dividend: (Self, U)) -> ((Self, U), Self);
|
||||||
|
|
Loading…
Reference in New Issue