diff --git a/src/uu/factor/src/numeric.rs b/src/uu/factor/src/numeric.rs index 2d5d1ec21..f1dc94eed 100644 --- a/src/uu/factor/src/numeric.rs +++ b/src/uu/factor/src/numeric.rs @@ -82,9 +82,7 @@ impl Montgomery { // (x + n*m) / R // in case of overflow, this is (2¹²⁸ + xnm)/2⁶⁴ - n = xnm/2⁶⁴ + (2⁶⁴ - n) - let y = - (xnm >> 64) as u64 + - if !overflow { 0 } else { n.wrapping_neg() }; + let y = (xnm >> 64) as u64 + if !overflow { 0 } else { n.wrapping_neg() }; if y >= *n { y - n diff --git a/src/uu/factor/src/rho.rs b/src/uu/factor/src/rho.rs index a6608747a..5416218e1 100644 --- a/src/uu/factor/src/rho.rs +++ b/src/uu/factor/src/rho.rs @@ -3,9 +3,9 @@ use rand::rngs::SmallRng; use rand::{thread_rng, SeedableRng}; use std::cmp::{max, min}; -use crate::{Factors,miller_rabin}; use crate::miller_rabin::Result::*; use crate::numeric::*; +use crate::{miller_rabin, Factors}; fn find_divisor(n: A) -> u64 { #![allow(clippy::many_single_char_names)]