clippy: Fix single_match warnings (#31876)

This commit is contained in:
Oluwatobi Sofela 2024-03-26 15:01:10 +01:00 committed by GitHub
parent d16f259e1d
commit b71de92569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 115 additions and 133 deletions

View file

@ -741,13 +741,10 @@ fn parse_time_component(value: &str) -> Option<(u32, u32, f64)> {
if second_iterator.next()?.len() != 2 {
return None;
}
match second_iterator.next() {
Some(second_last) => {
if second_last.len() > 3 {
return None;
}
},
None => {},
if let Some(second_last) = second_iterator.next() {
if second_last.len() > 3 {
return None;
}
}
second.parse::<f64>().ok()?