mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
clippy fix
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ fn findAIvalue(i: usize, rawText: &str) -> Option<String> {
|
||||
if currentChar == ')' {
|
||||
return Some(buf);
|
||||
}
|
||||
if !('0'..='9').contains(¤tChar) {
|
||||
if !currentChar.is_ascii_digit() {
|
||||
return None;
|
||||
}
|
||||
buf.push(currentChar);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user