Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -251,7 +251,7 @@ fn findAIvalue(i: usize, rawText: &str) -> Option<String> {
if currentChar == ')' {
return Some(buf);
}
if currentChar < '0' || currentChar > '9' {
if !('0'..='9').contains(&currentChar) {
return None;
}
buf.push(currentChar);
@@ -270,7 +270,7 @@ fn findValue(i: usize, rawText: &str) -> String {
if c == '(' {
// We look for a new AI. If it doesn't exist (ERROR), we continue
// with the iteration
if let Some(_) = findAIvalue(index, rawTextAux) {
if findAIvalue(index, rawTextAux).is_some() {
break;
}
// if findAIvalue(index, rawTextAux) != null {