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

@ -106,7 +106,7 @@ unsafe extern "C" fn off_thread_compilation_callback(
let final_url = context.final_url.clone();
let script_element = context.script_element.clone();
let script_kind = context.script_kind;
let script = replace(&mut context.script_text, String::new());
let script = std::mem::take(&mut context.script_text);
let fetch_options = context.fetch_options.clone();
// Continue with <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script>