File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 359
359
#![ feature( const_type_id) ]
360
360
#![ feature( core_intrinsics) ]
361
361
#![ feature( generic_associated_types) ]
362
- #![ feature( hash_set_entry) ]
363
362
#![ feature( maybe_uninit_slice) ]
364
363
#![ feature( maybe_uninit_write_slice) ]
365
364
#![ feature( ptr_metadata) ]
Original file line number Diff line number Diff line change @@ -237,7 +237,10 @@ impl FrozenHeap {
237
237
/// is kept alive. Used if a [`FrozenValue`] in this heap points at values in another
238
238
/// [`FrozenHeap`].
239
239
pub fn add_reference ( & self , heap : & FrozenHeapRef ) {
240
- self . refs . borrow_mut ( ) . get_or_insert_owned ( heap) ;
240
+ let mut refs = self . refs . borrow_mut ( ) ;
241
+ if !refs. contains ( heap) {
242
+ refs. insert ( heap. dupe ( ) ) ;
243
+ }
241
244
}
242
245
243
246
fn alloc_raw ( & self , x : impl AValue < ' static , ExtraElem = ( ) > + Send + Sync ) -> FrozenValue {
You can’t perform that action at this time.
0 commit comments