aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gamepadlist.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/gamepadlist.rs
parent585e0d69cdf00319125fa7260fde9cd16d57b2d8 (diff)
downloadservo-f7669b5238ce9e2a94495472bf77f67b0e311cd8.tar.gz
servo-f7669b5238ce9e2a94495472bf77f67b0e311cd8.zip
fixes dereferencing on an immutable reference (#31864)
Diffstat (limited to 'components/script/dom/gamepadlist.rs')
-rw-r--r--components/script/dom/gamepadlist.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/gamepadlist.rs b/components/script/dom/gamepadlist.rs
index 5efa99f7aa8..847f8632ab7 100644
--- a/components/script/dom/gamepadlist.rs
+++ b/components/script/dom/gamepadlist.rs
@@ -38,7 +38,7 @@ impl GamepadList {
.iter()
.any(|g| g.gamepad_id() == gamepad.gamepad_id())
{
- self.list.borrow_mut().push(Dom::from_ref(&*gamepad));
+ self.list.borrow_mut().push(Dom::from_ref(gamepad));
// Ensure that the gamepad has the correct index
gamepad.update_index(self.list.borrow().len() as i32 - 1);
}