Make get/get_mut/remove in HashMap more flexible with Borrow trait
choznerol opened this issue · 2 comments
I noticed the TODO message along with the helpful hints in the HashMap implementation:
rust-algorithm-club/src/collections/hash_map/mod.rs
Lines 61 to 86 in 188bb59
if it's not currently under development, I would love to give it a try!
The test in HashMap are all using this type Map ...
in which K
and V
are set;
while in SinglyLinkedList, tests define the generic type one by one
by completing this TODO, somewhere I'll need to add, for example HashMap<String, String>
. Should I just follow the style in SinglyLinkList
and update the tests in HashMap
, or maybe there are some preferred testing style ?
Yeah, you're welcome to take the borrow trait task.
As for the testing style, my preference is no preference. Anything making code more clearer is acceptable. If there is some room to improve, just go for it!