fixup! isqrt: initial implementation

Fix C-ism and type inference.
This commit is contained in:
Federico Stra 2023-09-28 10:43:41 +02:00
parent d49da0fe54
commit 17dfb18bd1

View File

@ -1997,11 +1997,11 @@ macro_rules! uint_impl {
return self;
}
let mut x: Self = self;
let mut c: Self = 0;
let mut d: Self = 1 << (self.ilog2() & !1);
let mut x = self;
let mut c = 0;
let mut d = 1 << (self.ilog2() & !1);
while (d != 0) {
while d != 0 {
if x >= c + d {
x -= c + d;
c = (c >> 1) + d;