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:
Ekta Siwach 2024-03-28 22:27:25 +05:30 committed by GitHub
parent 9303c90159
commit 7ce78f5a74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 9 deletions

View file

@ -142,7 +142,7 @@ impl TextTrackMethods for TextTrack {
// gecko calls RemoveCue when the given cue
// has an associated track, but doesn't return
// the error from it, so we wont either.
if let Err(_) = old_track.RemoveCue(cue) {
if old_track.RemoveCue(cue).is_err() {
warn!("Failed to remove cues for the added cue's text track");
}
}