瀏覽代碼

fix removing debug borrow information when the ref is dropped

Evan Almloff 1 年之前
父節點
當前提交
93adb35cfa
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 _));
     }
 }