Skip to content

Commit

Permalink
Fix no_std build
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Jul 4, 2018
1 parent 6368fca commit 3fe3540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ pub fn extended_gcd<T: Integer + NumRef>(a: T, b: T) -> GcdResult<T>

while r != T::zero() {
let quotient = &old_r / &r;
old_r = old_r - &quotient * &r; std::mem::swap(&mut old_r, &mut r);
old_s = old_s - &quotient * &s; std::mem::swap(&mut old_s, &mut s);
old_t = old_t - quotient * &t; std::mem::swap(&mut old_t, &mut t);
old_r = old_r - &quotient * &r; mem::swap(&mut old_r, &mut r);
old_s = old_s - &quotient * &s; mem::swap(&mut old_s, &mut s);
old_t = old_t - quotient * &t; mem::swap(&mut old_t, &mut t);
}

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

0 comments on commit 3fe3540

Please sign in to comment.