diff --git a/src/uint/mul.rs b/src/uint/mul.rs index fb3175e6e..66acd677d 100644 --- a/src/uint/mul.rs +++ b/src/uint/mul.rs @@ -2,6 +2,7 @@ // TODO(tarcieri): use Karatsuba for better performance +use super::concat::concat_mixed; use crate::{ Checked, CheckedMul, Concat, ConcatMixed, Limb, Uint, WideningMul, Wrapping, WrappingMul, Zero, }; @@ -90,12 +91,12 @@ impl Uint { } /// Square self, returning a concatenated "wide" result. - pub fn square(&self) -> ::Output + pub const fn square(&self) -> Uint where - Self: Concat, + Self: Concat>, { let (lo, hi) = self.square_wide(); - hi.concat(&lo) + concat_mixed(&lo, &hi) } /// Square self, returning a "wide" result in two parts as (lo, hi).