mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix mem_replace_with_default warnings (#31921)
This commit is contained in:
parent
7100465d1a
commit
66ad795014
7 changed files with 9 additions and 22 deletions
|
@ -1191,8 +1191,7 @@ impl HTMLMediaElement {
|
|||
/// `fulfill_in_flight_play_promises`, to actually fulfill the promises
|
||||
/// which were taken and moved to the in-flight queue.
|
||||
fn take_pending_play_promises(&self, result: ErrorResult) {
|
||||
let pending_play_promises =
|
||||
mem::replace(&mut *self.pending_play_promises.borrow_mut(), vec![]);
|
||||
let pending_play_promises = std::mem::take(&mut *self.pending_play_promises.borrow_mut());
|
||||
self.in_flight_play_promises_queue
|
||||
.borrow_mut()
|
||||
.push_back((pending_play_promises.into(), result));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue