mirror of
https://github.com/servo/servo.git
synced 2025-06-18 13:24:29 +00:00
clippy: Fix suggestions in script
, libservo
, and servoshell
(#33453)
* fix clone on copy warning in servoshell Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Remove unecessary borrow in libservo Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Ignore too many arguments warning on create_constellation() Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * fix explicit auto-deref warning Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Autofix multiple clippy warnings in components/script Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> --------- Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
This commit is contained in:
parent
6a3cdc47ec
commit
ed6b1b5e6a
22 changed files with 44 additions and 42 deletions
|
@ -1664,7 +1664,7 @@ impl ScriptThread {
|
|||
.iter()
|
||||
.filter(|(_, document)| document.window().is_top_level())
|
||||
.flat_map(|(id, document)| {
|
||||
std::iter::once(id.clone()).chain(
|
||||
std::iter::once(id).chain(
|
||||
document
|
||||
.iter_iframes()
|
||||
.filter_map(|iframe| iframe.pipeline_id()),
|
||||
|
@ -2556,8 +2556,8 @@ impl ScriptThread {
|
|||
DevtoolScriptControlMsg::EvaluateJS(id, s, reply) => match documents.find_window(id) {
|
||||
Some(window) => {
|
||||
let global = window.upcast::<GlobalScope>();
|
||||
let _aes = AutoEntryScript::new(&global);
|
||||
devtools::handle_evaluate_js(&global, s, reply)
|
||||
let _aes = AutoEntryScript::new(global);
|
||||
devtools::handle_evaluate_js(global, s, reply)
|
||||
},
|
||||
None => warn!("Message sent to closed pipeline {}.", id),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue