mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix warnings in components/script
(#31700)
* Fix warnings: immediate dereferencing of references and unneeded statement * Fix warnings in Components/script
This commit is contained in:
parent
47a4ce467f
commit
8a6481c341
2 changed files with 6 additions and 6 deletions
|
@ -300,10 +300,10 @@ pub fn handle_execute_script(
|
|||
global.evaluate_js_on_global_with_result(
|
||||
&eval,
|
||||
rval.handle_mut(),
|
||||
ScriptFetchOptions::default_classic_script(&global),
|
||||
ScriptFetchOptions::default_classic_script(global),
|
||||
global.api_base_url(),
|
||||
);
|
||||
jsval_to_webdriver(*cx, &window.upcast::<GlobalScope>(), rval.handle())
|
||||
jsval_to_webdriver(*cx, window.upcast::<GlobalScope>(), rval.handle())
|
||||
};
|
||||
|
||||
reply.send(result).unwrap();
|
||||
|
@ -330,7 +330,7 @@ pub fn handle_execute_async_script(
|
|||
global.evaluate_js_on_global_with_result(
|
||||
&eval,
|
||||
rval.handle_mut(),
|
||||
ScriptFetchOptions::default_classic_script(&global),
|
||||
ScriptFetchOptions::default_classic_script(global),
|
||||
global.api_base_url(),
|
||||
);
|
||||
},
|
||||
|
@ -1048,7 +1048,7 @@ pub fn handle_get_css(
|
|||
let element = node.downcast::<Element>().unwrap();
|
||||
Ok(String::from(
|
||||
window
|
||||
.GetComputedStyle(&element, None)
|
||||
.GetComputedStyle(element, None)
|
||||
.GetPropertyValue(DOMString::from(name)),
|
||||
))
|
||||
}),
|
||||
|
@ -1173,7 +1173,7 @@ pub fn handle_is_enabled(
|
|||
) {
|
||||
reply
|
||||
.send(
|
||||
find_node_by_unique_id(&documents, pipeline, element_id).and_then(|node| match node
|
||||
find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| match node
|
||||
.downcast::<Element>(
|
||||
) {
|
||||
Some(element) => Ok(element.enabled_state()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue