Closed
Description
Location
https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.insert
Summary
HashSet::insert
is underspecified.
It says:
If the set already contained this value, false is returned.
But when the set already contains a value, is existing value replaced with new, or new value just discarded?
It does not make difference for primitive types, but can have significant effect when inserting Arc
for example.