-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Added to_str() method for HashMap and HashSet #6414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Why is the test commented out? |
All tests pass with the existing tests. For some reason, I was getting test failures (on the tests I wrote myself). I compiled a simple test Rust program and testing hash_table.to_str() works fine. The order in which the elements are accessed is prone to change. I think that is why the test may have failed. I'll try getting the empty HashMap test to pass and recommit. |
…Table doesn't need to be mutable.
acc | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change all the ~"foo"
to "foo"
, expect for the initial one.
1. Extra space removed. 2. Using acc.push_str() instead of str::push_str 3. Update test to reflect representation change.
Also added some whitespace to enhance readabilty.
All tests now pass.
All tests pass now.
Implemented to_str() for HashMap and HashSet Added tests. Minor formatting and stylistic cleanups.
Implemented to_str() for HashMap and HashSet
Added tests.
Minor formatting and stylistic cleanups.