fastnum 0.7.4

Fast decimal numbers library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
macro_rules! to_uint_impl {
    ($($to_uint:ident -> $uint:ident),*) => {
        $(
            #[doc = concat!("Converts [Self] into [`prim@", stringify!($uint), "`].")]
            #[inline]
            pub const fn $to_uint(self) -> Result<$uint, ParseError> {
                if self.is_negative() {
                    Err(ParseError::Signed)
                } else {
                    UInt(self.0.to_bits()).$to_uint()
                }
            }
        )*
    };
}

pub(crate) use to_uint_impl;