clippy: Fix let_and_return warnings (#31964)

This commit is contained in:
Oluwatobi Sofela 2024-04-01 16:43:24 +01:00 committed by GitHub
parent 0da2508e4d
commit c7b73e1ef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 17 additions and 31 deletions

View file

@ -309,11 +309,10 @@ impl BlobMethods for Blob {
/// see <https://github.com/w3c/FileAPI/issues/43>
pub fn normalize_type_string(s: &str) -> String {
if is_ascii_printable(s) {
let s_lower = s.to_ascii_lowercase();
s.to_ascii_lowercase()
// match s_lower.parse() as Result<Mime, ()> {
// Ok(_) => s_lower,
// Err(_) => "".to_string()
s_lower
} else {
"".to_string()
}