@@ -724,7 +724,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
724724 self . need_bitfield_allocation . push ( id) ;
725725 }
726726
727- let old_item = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
727+ let old_item = self . items [ id. 0 ] . replace ( item) ;
728728 assert ! (
729729 old_item. is_none( ) ,
730730 "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!"
827827 self . add_item_to_module ( & item) ;
828828
829829 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) ;
831831 assert ! (
832832 old_item. is_none( ) ,
833833 "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!"
987987
988988 let result = f ( self , & mut item) ;
989989
990- let existing = mem :: replace ( & mut self . items [ id. 0 ] , Some ( item) ) ;
990+ let existing = self . items [ id. 0 ] . replace ( item) ;
991991 assert ! ( existing. is_none( ) ) ;
992992
993993 result
@@ -1434,7 +1434,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14341434 debug_assert ! ( item. kind( ) . is_type( ) ) ;
14351435 self . add_item_to_module ( & item) ;
14361436 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) ;
14381438 assert ! ( old_item. is_none( ) , "Inserted type twice?" ) ;
14391439 }
14401440
0 commit comments