mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
clippy: Fix search_is_some warnings (#31971)
This commit is contained in:
parent
71f4c5c916
commit
da3991c8f3
3 changed files with 6 additions and 12 deletions
|
@ -131,7 +131,7 @@ impl MediaStreamMethods for MediaStream {
|
|||
|
||||
/// <https://w3c.github.io/mediacapture-main/#dom-mediastream-addtrack>
|
||||
fn AddTrack(&self, track: &MediaStreamTrack) {
|
||||
let existing = self.tracks.borrow().iter().find(|x| *x == &track).is_some();
|
||||
let existing = self.tracks.borrow().iter().any(|x| x == &track);
|
||||
|
||||
if existing {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue