Closed choznerol closed 6 years ago
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 ?
@choznerol
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!
I noticed the TODO message along with the helpful hints in the HashMap implementation:
https://github.com/weihanglo/rust-algorithm-club/blob/188bb59ee0808dd0da4632eccf3b1cce192ed2be/src/collections/hash_map/mod.rs#L61-L86
if it's not currently under development, I would love to give it a try!