uint icon indicating copy to clipboard operation
uint copied to clipboard

`algorithms/gcd/gcd_old`: Rewrite using to_u64 -> Option

Open github-actions[bot] opened this issue 2 years ago • 0 comments

On 2022-06-06 @recmo wrote in 4c74c09 “Merge pull request #110 from recmo/gcd”:

Rewrite using to_u64 -> Option

// We shadow s for readability.
#[allow(clippy::shadow_unrelated)]
fn lehmer_double(mut r0: U256, mut r1: U256) -> Matrix {
    debug_assert!(r0 >= r1);
    if r0.leading_zeros() >= 192 {
        // OPT: Rewrite using to_u64 -> Option
        debug_assert!(r1.leading_zeros() >= 192);
        debug_assert!(r0.limb(0) >= r1.limb(0));
        return lehmer_small(r0.limb(0), r1.limb(0));
    }
    let s = r0.leading_zeros();

From src/algorithms/gcd/gcd_old.rs:294

github-actions[bot] avatar Jun 06 '22 03:06 github-actions[bot]