The following claim is incorrect:
Only copies the key if a new entry is inserted.
In particular, search_entry_hashed2 calls IntoCow::into_owned if the key is not found, even if VacantEntry::insert is not called. Ideally, VacantEntry would be changed to delay copying until insert is called.
The following claim is incorrect:
In particular,
search_entry_hashed2callsIntoCow::into_ownedif the key is not found, even ifVacantEntry::insertis not called. Ideally,VacantEntrywould be changed to delay copying untilinsertis called.