mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -459,7 +459,7 @@ impl Animations {
|
|||
pub(crate) fn send_pending_events(&self, window: &Window) {
|
||||
// Take all of the events here, in case sending one of these events
|
||||
// triggers adding new events by forcing a layout.
|
||||
let events = std::mem::replace(&mut *self.pending_events.borrow_mut(), Vec::new());
|
||||
let events = std::mem::take(&mut *self.pending_events.borrow_mut());
|
||||
if events.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue