1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-04 15:07:47 +00:00

refactor/polish ~ fix cargo clippy complaints (allow many_single_char_names)

This commit is contained in:
Roy Ivy III 2019-12-25 18:41:03 -06:00
parent 44a60f773f
commit 99ce03f259
2 changed files with 3 additions and 0 deletions

View file

@ -53,6 +53,7 @@ fn gcd(mut a: u64, mut b: u64) -> u64 {
}
fn rho_pollard_find_divisor(num: u64) -> u64 {
#![allow(clippy::many_single_char_names)]
let range = Uniform::new(1, num);
let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap();
let mut x = range.sample(&mut rng);

View file

@ -245,6 +245,7 @@ impl Splitter for ByteSplitter {
}
// (1, 3) -> "aab"
#[allow(clippy::many_single_char_names)]
fn str_prefix(i: usize, width: usize) -> String {
let mut c = "".to_owned();
let mut n = i;
@ -260,6 +261,7 @@ fn str_prefix(i: usize, width: usize) -> String {
}
// (1, 3) -> "001"
#[allow(clippy::many_single_char_names)]
fn num_prefix(i: usize, width: usize) -> String {
let mut c = "".to_owned();
let mut n = i;