diff --git a/src/uint/macros.rs b/src/uint/macros.rs index b43ef1a2e..689482f8b 100644 --- a/src/uint/macros.rs +++ b/src/uint/macros.rs @@ -136,13 +136,6 @@ macro_rules! impl_uint_concat_split_even { { type Output = Uint<{ <$name>::LIMBS / 2 }>; } - - impl $name { - /// Split this number in half, returning its low and high components respectively. - pub const fn split(&self) -> (Uint<{ <$name>::LIMBS / 2 }>, Uint<{ <$name>::LIMBS / 2 }>) { - self.split_mixed() - } - } }; ($($name:ident,)+) => { $( diff --git a/src/uint/split.rs b/src/uint/split.rs index e93cb39f5..9421c9fae 100644 --- a/src/uint/split.rs +++ b/src/uint/split.rs @@ -1,6 +1,14 @@ -use crate::{Limb, SplitMixed, Uint}; +use crate::{Limb, Split, SplitMixed, Uint}; impl Uint { + /// Split this number in half into low and high components. + pub const fn split(&self) -> (Uint, Uint) + where + Self: Split>, + { + self.split_mixed() + } + /// Split this number into low and high components respectively. #[inline] pub const fn split_mixed(&self) -> (Uint, Uint)