clippy: Fix mem_replace_with_default warnings (#31921)

This commit is contained in:
Oluwatobi Sofela 2024-03-28 14:10:37 +01:00 committed by GitHub
parent 7100465d1a
commit 66ad795014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 22 deletions

View file

@ -867,8 +867,7 @@ impl LayoutThread {
reflow_result: &mut ReflowComplete,
shared_lock: &SharedRwLock,
) {
reflow_result.pending_images =
std::mem::replace(&mut *context.pending_images.lock().unwrap(), vec![]);
reflow_result.pending_images = std::mem::take(&mut *context.pending_images.lock().unwrap());
match *reflow_goal {
ReflowGoal::LayoutQuery(ref querymsg, _) => match querymsg {