Closed Jackbaude closed 1 year ago
Ive looked into the implementation of HashMap::insert()
, it says:
If the map did not have this key present, None is returned. If the map did have this key present, the value is updated, and the old value is returned. The key is not updated, though; this matters for types that can be == without being identical. See the module-level documentation for more.
I believe that using the insert
method takes care of the logic here, and that testing is not needed. PTAL @baude
no, the test is still valid
Per discussion of this PR, add test cases for two identical leases that are added. Adding an identical lease should not panic and discard the identical lease.