mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
@@ -27,6 +27,9 @@ static NAME: &'static str = "factor";
|
||||
fn factor(mut num: u64) -> Vec<u64> {
|
||||
let mut ret = Vec::new();
|
||||
|
||||
if num < 2 {
|
||||
return ret;
|
||||
}
|
||||
while num % 2 == 0 {
|
||||
num /= 2;
|
||||
ret.push(2);
|
||||
|
||||
+1
-1
Submodule md5sum/rust-crypto updated: adde85617a...1711f3a648
Reference in New Issue
Block a user