Skip to content

Commit 3fe3540

Browse files
committed
Fix no_std build
1 parent 6368fca commit 3fe3540

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
@@ -704,9 +704,9 @@ pub fn extended_gcd<T: Integer + NumRef>(a: T, b: T) -> GcdResult<T>
704704

705705
while r != T::zero() {
706706
let quotient = &old_r / &r;
707-
old_r = old_r - &quotient * &r; std::mem::swap(&mut old_r, &mut r);
708-
old_s = old_s - &quotient * &s; std::mem::swap(&mut old_s, &mut s);
709-
old_t = old_t - quotient * &t; std::mem::swap(&mut old_t, &mut t);
707+
old_r = old_r - &quotient * &r; mem::swap(&mut old_r, &mut r);
708+
old_s = old_s - &quotient * &s; mem::swap(&mut old_s, &mut s);
709+
old_t = old_t - quotient * &t; mem::swap(&mut old_t, &mut t);
710710
}
711711

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

0 commit comments

Comments
 (0)