Skip to content

Commit a2d1cac

Browse files
committed
Fix no_std build
1 parent bba7294 commit a2d1cac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,9 @@ pub fn extended_gcd<T: Integer + NumRef>(a: T, b: T) -> GcdResult<T>
10331033

10341034
while r != T::zero() {
10351035
let quotient = &old_r / &r;
1036-
old_r = old_r - &quotient * &r; std::mem::swap(&mut old_r, &mut r);
1037-
old_s = old_s - &quotient * &s; std::mem::swap(&mut old_s, &mut s);
1038-
old_t = old_t - quotient * &t; std::mem::swap(&mut old_t, &mut t);
1036+
old_r = old_r - &quotient * &r; mem::swap(&mut old_r, &mut r);
1037+
old_s = old_s - &quotient * &s; mem::swap(&mut old_s, &mut s);
1038+
old_t = old_t - quotient * &t; mem::swap(&mut old_t, &mut t);
10391039
}
10401040

10411041
let _quotients = (t, s); // == (a, b) / gcd

0 commit comments

Comments
 (0)