1
Fork 0
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:
nicoo 2020-07-04 12:56:25 +02:00
parent e9e263ac66
commit 9b0f131135

View file

@ -86,7 +86,6 @@ pub fn factor(mut n: u64) -> Factors {
let mut factors = Factors::one();
if n < 2 {
factors.push(n);
return factors;
}