clippy fix

This commit is contained in:
Henry
2023-04-28 19:41:23 -05:00
parent 2afc6be3dc
commit ef999a4eb0
36 changed files with 122 additions and 137 deletions

View File

@@ -63,7 +63,6 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
} else {
COMMA
.split(hostEmail)
.into_iter()
.map(|s| s.to_owned())
.collect()
};
@@ -81,7 +80,6 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
if let Some(tosString) = nv.get("to") {
tos = COMMA
.split(tosString)
.into_iter()
.map(|s| s.to_owned())
.collect();
}
@@ -92,7 +90,6 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
if let Some(ccString) = nv.get("cc") {
ccs = COMMA
.split(ccString)
.into_iter()
.map(|s| s.to_owned())
.collect();
}
@@ -102,7 +99,6 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
if let Some(bccString) = nv.get("bcc") {
bccs = COMMA
.split(bccString)
.into_iter()
.map(|s| s.to_owned())
.collect();
}

View File

@@ -251,7 +251,7 @@ fn findAIvalue(i: usize, rawText: &str) -> Option<String> {
if currentChar == ')' {
return Some(buf);
}
if !('0'..='9').contains(&currentChar) {
if !currentChar.is_ascii_digit() {
return None;
}
buf.push(currentChar);

View File

@@ -227,7 +227,7 @@ pub fn unescapeBackslash(escaped: &str) -> String {
}
pub fn parseHexDigit(c: char) -> i32 {
if ('0'..='9').contains(&c) {
if c.is_ascii_digit() {
return (c as u8 - b'0') as i32;
}
if ('a'..='f').contains(&c) {