@@ -724,7 +724,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
724
724
self . need_bitfield_allocation . push ( id) ;
725
725
}
726
726
727
- let old_item = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
727
+ let old_item = self . items [ id. 0 ] . replace ( item) ;
728
728
assert ! (
729
729
old_item. is_none( ) ,
730
730
"should not have already associated an item with the given id"
@@ -827,7 +827,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
827
827
self . add_item_to_module ( & item) ;
828
828
829
829
let id = item. id ( ) ;
830
- let old_item = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
830
+ let old_item = self . items [ id. 0 ] . replace ( item) ;
831
831
assert ! (
832
832
old_item. is_none( ) ,
833
833
"should not have already associated an item with the given id"
@@ -987,7 +987,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
987
987
988
988
let result = f ( self , & mut item) ;
989
989
990
- let existing = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
990
+ let existing = self . items [ id. 0 ] . replace ( item) ;
991
991
assert ! ( existing. is_none( ) ) ;
992
992
993
993
result
@@ -1434,7 +1434,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
1434
1434
debug_assert ! ( item. kind( ) . is_type( ) ) ;
1435
1435
self . add_item_to_module ( & item) ;
1436
1436
let id = item. id ( ) ;
1437
- let old_item = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
1437
+ let old_item = self . items [ id. 0 ] . replace ( item) ;
1438
1438
assert ! ( old_item. is_none( ) , "Inserted type twice?" ) ;
1439
1439
}
1440
1440
0 commit comments