소스 검색

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