From 93adb35cfa9b6e9f006c028803d801b871e7236b Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Tue, 23 Jan 2024 07:41:46 -0600 Subject: [PATCH] fix removing debug borrow information when the ref is dropped --- packages/generational-box/src/references.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/generational-box/src/references.rs b/packages/generational-box/src/references.rs index 57e828242..36f8504e4 100644 --- a/packages/generational-box/src/references.rs +++ b/packages/generational-box/src/references.rs @@ -57,7 +57,7 @@ impl Drop for GenerationalRefBorrowInfo { self.borrowed_from .borrowed_at .write() - .retain(|location| std::ptr::eq(*location, self.borrowed_at as *const _)); + .retain(|location| !std::ptr::eq(*location, self.borrowed_at as *const _)); } }