mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
clippy: Fix some warnings in script/dom
(#31915)
* fixed some clippy warnings * resolved conflict * updated texttracklist.rs --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
9303c90159
commit
7ce78f5a74
3 changed files with 5 additions and 9 deletions
|
@ -42,8 +42,7 @@ impl TextTrackCueList {
|
|||
.borrow()
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(_, c)| **c == cue)
|
||||
.next()
|
||||
.find(|(_, c)| **c == cue)
|
||||
.map(|(i, _)| i)
|
||||
}
|
||||
|
||||
|
@ -78,8 +77,7 @@ impl TextTrackCueListMethods for TextTrackCueList {
|
|||
self.dom_cues
|
||||
.borrow()
|
||||
.iter()
|
||||
.filter(|cue| cue.id() == id)
|
||||
.next()
|
||||
.find(|cue| cue.id() == id)
|
||||
.map(|t| DomRoot::from_ref(&**t))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue