mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
clippy fix
This commit is contained in:
@@ -566,7 +566,7 @@ fn generateText(
|
||||
for j in 0..wordLength.ceil() as u32 {
|
||||
// for (int j = 0; j < wordLength; j++) {
|
||||
let mut c = chars[maxIndex];
|
||||
if j == 0 && ('a'..='z').contains(&c) && random.next_bool() {
|
||||
if j == 0 && c.is_ascii_lowercase() && random.next_bool() {
|
||||
c = char::from_u32(c as u32 - 'a' as u32 + 'A' as u32).unwrap();
|
||||
}
|
||||
result.push(c);
|
||||
|
||||
@@ -667,15 +667,15 @@ fn encodeNumeric<T: ECIInput + ?Sized>(
|
||||
}
|
||||
|
||||
fn isDigit(ch: char) -> bool {
|
||||
('0'..='9').contains(&ch)
|
||||
ch.is_ascii_digit()
|
||||
}
|
||||
|
||||
fn isAlphaUpper(ch: char) -> bool {
|
||||
ch == ' ' || ('A'..='Z').contains(&ch)
|
||||
ch == ' ' || ch.is_ascii_uppercase()
|
||||
}
|
||||
|
||||
fn isAlphaLower(ch: char) -> bool {
|
||||
ch == ' ' || ('a'..='z').contains(&ch)
|
||||
ch == ' ' || ch.is_ascii_lowercase()
|
||||
}
|
||||
|
||||
fn isMixed(ch: char) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user