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:
parent
44a60f773f
commit
99ce03f259
2 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,7 @@ fn gcd(mut a: u64, mut b: u64) -> u64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rho_pollard_find_divisor(num: u64) -> u64 {
|
fn rho_pollard_find_divisor(num: u64) -> u64 {
|
||||||
|
#![allow(clippy::many_single_char_names)]
|
||||||
let range = Uniform::new(1, num);
|
let range = Uniform::new(1, num);
|
||||||
let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap();
|
let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap();
|
||||||
let mut x = range.sample(&mut rng);
|
let mut x = range.sample(&mut rng);
|
||||||
|
|
|
@ -245,6 +245,7 @@ impl Splitter for ByteSplitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// (1, 3) -> "aab"
|
// (1, 3) -> "aab"
|
||||||
|
#[allow(clippy::many_single_char_names)]
|
||||||
fn str_prefix(i: usize, width: usize) -> String {
|
fn str_prefix(i: usize, width: usize) -> String {
|
||||||
let mut c = "".to_owned();
|
let mut c = "".to_owned();
|
||||||
let mut n = i;
|
let mut n = i;
|
||||||
|
@ -260,6 +261,7 @@ fn str_prefix(i: usize, width: usize) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
// (1, 3) -> "001"
|
// (1, 3) -> "001"
|
||||||
|
#[allow(clippy::many_single_char_names)]
|
||||||
fn num_prefix(i: usize, width: usize) -> String {
|
fn num_prefix(i: usize, width: usize) -> String {
|
||||||
let mut c = "".to_owned();
|
let mut c = "".to_owned();
|
||||||
let mut n = i;
|
let mut n = i;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue