Skip to content

Commit 196f915

Browse files
author
Ahmed
committed
make uint does not depend on external uses
This is better practice in general Signed-off-by: Ahmed <>
1 parent 390b3e4 commit 196f915

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/sizes.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -600,18 +600,13 @@ impl_array_sizes_with_import! {
600600
#[allow(missing_docs)]
601601
mod extra_sizes {
602602
use super::{ArraySize, AssocArraySize};
603-
use typenum::{
604-
consts::{B0, B1},
605-
UInt, UTerm,
606-
};
607-
608603
// This macro constructs a UInt type from a sequence of bits. The bits are interpreted as the
609604
// little-endian representation of the integer in question. For example, uint!(1 1 0 1 0 0 1) is
610605
// U75 (not U105).
611606
macro_rules! uint {
612-
() => { UTerm };
613-
(0 $($bs:tt)*) => { UInt< uint!($($bs)*), B0 > };
614-
(1 $($bs:tt)*) => { UInt< uint!($($bs)*), B1 > };
607+
() => { typenum::UTerm };
608+
(0 $($bs:tt)*) => { typenum::UInt< uint!($($bs)*), typenum::B0 > };
609+
(1 $($bs:tt)*) => { typenum::UInt< uint!($($bs)*), typenum::B1 > };
615610
}
616611

617612
pub type U1040 = uint!(0 0 0 0 1 0 0 0 0 0 1);

0 commit comments

Comments
 (0)