Nothing Special   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
fixed fixme
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev committed Jun 1, 2024
1 parent 6ab4bb9 commit e7752e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/script/dom/bindings/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,9 @@ impl RootCollection {
unsafe fn unroot(&self, object: *const dyn JSTraceable) {
assert_in_script();
let roots = &mut *self.roots.get();
// FIXME: Use std::ptr::addr_eq after migrating to newer version of std.
match roots
.iter()
.rposition(|r| std::ptr::eq(*r as *const (), object as *const ()))
.rposition(|r| std::ptr::addr_eq(*r as *const (), object as *const ()))
{
Some(idx) => {
roots.remove(idx);
Expand Down

0 comments on commit e7752e5

Please sign in to comment.