From 72e48b5669d4f60a45963d7aff360936f3b7b26f Mon Sep 17 00:00:00 2001 From: Yannick Poirier Date: Tue, 26 Dec 2023 10:44:47 +0100 Subject: [PATCH] Check ptr --- src/sender/observer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sender/observer.rs b/src/sender/observer.rs index a83afb2..9c9cd3b 100644 --- a/src/sender/observer.rs +++ b/src/sender/observer.rs @@ -40,7 +40,7 @@ impl ObserverList { self.0 .write() .unwrap() - .retain(|a| a.as_ref() as *const _ != s.as_ref() as *const _) + .retain(|a| !std::ptr::eq(a.as_ref() as *const _, s.as_ref() as *const _)) } pub fn dispatch(&self, event: &Event, now: std::time::SystemTime) {