aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
diff options
context:
space:
mode:
authorOluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com>2024-03-23 12:29:20 +0100
committerGitHub <noreply@github.com>2024-03-23 11:29:20 +0000
commit3c05b58221a2b5c879d31d355087a905de6494d8 (patch)
treeb5f5fdd441e9d028b7a1a71782edf237400db7cd /components/script/dom/bindings
parent3fc157338e20936b8446c4685a477fad4169d92a (diff)
downloadservo-3c05b58221a2b5c879d31d355087a905de6494d8.tar.gz
servo-3c05b58221a2b5c879d31d355087a905de6494d8.zip
clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)
* clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r--components/script/dom/bindings/htmlconstructor.rs8
-rw-r--r--components/script/dom/bindings/proxyhandler.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/bindings/htmlconstructor.rs b/components/script/dom/bindings/htmlconstructor.rs
index 6ed725d3720..111f78751d7 100644
--- a/components/script/dom/bindings/htmlconstructor.rs
+++ b/components/script/dom/bindings/htmlconstructor.rs
@@ -156,12 +156,12 @@ unsafe fn html_constructor(
// Any prototype used to create these elements will be overwritten before returning
// from this function, so we don't bother overwriting the defaults here.
let element = if definition.is_autonomous() {
- DomRoot::upcast(HTMLElement::new(name.local, None, &*document, None))
+ DomRoot::upcast(HTMLElement::new(name.local, None, &document, None))
} else {
create_native_html_element(
name,
None,
- &*document,
+ &document,
ElementCreator::ScriptCreated,
None,
)
@@ -176,7 +176,7 @@ unsafe fn html_constructor(
element.set_custom_element_definition(definition.clone());
// Step 8.5
- if !check_type(&*element) {
+ if !check_type(&element) {
throw_dom_exception(cx, global, Error::InvalidState);
return Err(());
} else {
@@ -193,7 +193,7 @@ unsafe fn html_constructor(
construction_stack.push(ConstructionStackEntry::AlreadyConstructedMarker);
// Step 13
- if !check_type(&*element) {
+ if !check_type(&element) {
throw_dom_exception(cx, global, Error::InvalidState);
return Err(());
} else {
diff --git a/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs
index 715896fe70d..632959e4e5e 100644
--- a/components/script/dom/bindings/proxyhandler.rs
+++ b/components/script/dom/bindings/proxyhandler.rs
@@ -246,7 +246,7 @@ pub unsafe fn report_cross_origin_denial(cx: SafeJSContext, id: RawHandleId, acc
if !JS_IsExceptionPending(*cx) {
let global = GlobalScope::from_context(*cx, InRealm::Already(&in_realm_proof));
// TODO: include `id` and `access` in the exception message
- throw_dom_exception(cx, &*global, Error::Security);
+ throw_dom_exception(cx, &global, Error::Security);
}
false
}