diff options
author | Aarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com> | 2024-03-26 14:07:44 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 08:37:44 +0000 |
commit | f7669b5238ce9e2a94495472bf77f67b0e311cd8 (patch) | |
tree | be0ade4499aadc0719dcdb8eb320457e5ed27fa8 /components/script/dom/node.rs | |
parent | 585e0d69cdf00319125fa7260fde9cd16d57b2d8 (diff) | |
download | servo-f7669b5238ce9e2a94495472bf77f67b0e311cd8.tar.gz servo-f7669b5238ce9e2a94495472bf77f67b0e311cd8.zip |
fixes dereferencing on an immutable reference (#31864)
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 65a47a53594..7f2d4105abd 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -785,7 +785,7 @@ impl Node { } pub fn to_trusted_node_address(&self) -> TrustedNodeAddress { - TrustedNodeAddress(&*self as *const Node as *const libc::c_void) + TrustedNodeAddress(self as *const Node as *const libc::c_void) } /// Returns the rendered bounding content box if the element is rendered, @@ -1242,7 +1242,7 @@ impl Node { /// <https://dom.spec.whatwg.org/#retarget> pub fn retarget(&self, b: &Node) -> DomRoot<Node> { - let mut a = DomRoot::from_ref(&*self); + let mut a = DomRoot::from_ref(self); loop { // Step 1. let a_root = a.GetRootNode(&GetRootNodeOptions::empty()); @@ -2970,7 +2970,7 @@ impl NodeMethods for Node { attr2 = Some(a); attr2owner = a.GetOwnerElement(); node2 = match attr2owner { - Some(ref e) => Some(&*e.upcast()), + Some(ref e) => Some(e.upcast()), None => None, } } |