aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorAarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com>2024-03-26 14:07:44 +0530
committerGitHub <noreply@github.com>2024-03-26 08:37:44 +0000
commitf7669b5238ce9e2a94495472bf77f67b0e311cd8 (patch)
treebe0ade4499aadc0719dcdb8eb320457e5ed27fa8 /components/script/dom/node.rs
parent585e0d69cdf00319125fa7260fde9cd16d57b2d8 (diff)
downloadservo-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.rs6
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,
}
}