clippy: Fix collapsible_else_if warnings (#31853)

This commit is contained in:
Oluwatobi Sofela 2024-03-26 10:15:04 +01:00 committed by GitHub
parent d814d05539
commit f8a2eaea47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 37 additions and 52 deletions

View file

@ -2868,11 +2868,9 @@ fn filter_from_accept(s: &DOMString) -> Vec<FilterPattern> {
for p in split_commas(s) {
if let Some('.') = p.chars().nth(0) {
filter.push(FilterPattern(p[1..].to_string()));
} else {
if let Some(exts) = mime_guess::get_mime_extensions_str(p) {
for ext in exts {
filter.push(FilterPattern(ext.to_string()));
}
} else if let Some(exts) = mime_guess::get_mime_extensions_str(p) {
for ext in exts {
filter.push(FilterPattern(ext.to_string()));
}
}
}