Fixed some clippy warnings by replacing 'match' with 'if' (#32007)

This commit is contained in:
komuhangi 2024-04-07 10:39:05 +03:00 committed by GitHub
parent 05f1bbf0a9
commit e0e3408650
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 71 deletions

View file

@ -2767,15 +2767,12 @@ impl FetchResponseListener for HTMLMediaElementFetchListener {
// restart the download later from where we left, we cancel
// the current request. Otherwise, we continue the request
// assuming that we may drop some frames.
match e {
PlayerError::EnoughData => {
if let Some(ref mut current_fetch_context) =
*elem.current_fetch_context.borrow_mut()
{
current_fetch_context.cancel(CancelReason::Backoff);
}
},
_ => (),
if e == PlayerError::EnoughData {
if let Some(ref mut current_fetch_context) =
*elem.current_fetch_context.borrow_mut()
{
current_fetch_context.cancel(CancelReason::Backoff);
}
}
warn!("Could not push input data to player {:?}", e);
return;