Explorar el Código

fix removing debug borrow information when the ref is dropped

Evan Almloff hace 1 año
padre
commit
93adb35cfa
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 _));
     }
 }