Fix panic after remove()
Fix panic after remove raised in #9
Reproduced issue by adding new tests, checked they failed
The underlying problem was lookup() and lookup_mut()'s handling of removed buckets, but lookup_or_free() did the right thing.
With the test in place fixes were:
-
Generalized the old lookup_or_free to cover all lookup cases by parameterizing the lock->guard function.
-
Delete dead code no longer needed due to above
Tested using cargo test:
test result: ok. 34 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out