clippy: Fix filter_next warnings (#31965)

This commit is contained in:
Oluwatobi Sofela 2024-04-01 16:44:07 +01:00 committed by GitHub
parent c7b73e1ef4
commit 0a40a800fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 14 deletions

View file

@ -118,8 +118,7 @@ impl FormDataMethods for FormData {
self.data
.borrow()
.iter()
.filter(|(datum_name, _)| datum_name.0 == name.0)
.next()
.find(|(datum_name, _)| datum_name.0 == name.0)
.map(|(_, datum)| match &datum.value {
FormDatumValue::String(ref s) => {
FileOrUSVString::USVString(USVString(s.to_string()))