From 99ce03f259ccb23c453fbf73d7da7faeb61176a5 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 25 Dec 2019 18:41:03 -0600 Subject: [PATCH] refactor/polish ~ fix `cargo clippy` complaints (allow many_single_char_names) --- src/factor/factor.rs | 1 + src/split/split.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/factor/factor.rs b/src/factor/factor.rs index b943148f2..ba39f27e1 100644 --- a/src/factor/factor.rs +++ b/src/factor/factor.rs @@ -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); diff --git a/src/split/split.rs b/src/split/split.rs index 25409b4aa..d867c773b 100644 --- a/src/split/split.rs +++ b/src/split/split.rs @@ -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;