mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fixed some clippy warnings by replacing 'match' with 'if' (#32007)
This commit is contained in:
parent
05f1bbf0a9
commit
e0e3408650
5 changed files with 57 additions and 71 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue