Jelajahi Sumber

fix removing debug borrow information when the ref is dropped

Evan Almloff 1 tahun lalu
induk
melakukan
93adb35cfa
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      packages/generational-box/src/references.rs

+ 1 - 1
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 _));
     }
 }