mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-03 14:37:45 +00:00
Fix bug in factor::factor::factor (>_>")
Non-prime numbers, such as 0 or 1, shouldn't be inserted in the factorisation.
This commit is contained in:
parent
e9e263ac66
commit
9b0f131135
1 changed files with 0 additions and 1 deletions
|
@ -86,7 +86,6 @@ pub fn factor(mut n: u64) -> Factors {
|
|||
let mut factors = Factors::one();
|
||||
|
||||
if n < 2 {
|
||||
factors.push(n);
|
||||
return factors;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue