Skip to content

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

Merged
merged 9 commits into from
May 12, 2013
Merged

Added to_str() method for HashMap and HashSet #6414

merged 9 commits into from
May 12, 2013

Conversation

samebchase
Copy link
Contributor

Implemented to_str() for HashMap and HashSet
Added tests.
Minor formatting and stylistic cleanups.

@luqmana luqmana mentioned this pull request May 10, 2013
@pcwalton
Copy link
Contributor

Why is the test commented out?

@samebchase
Copy link
Contributor Author

@pcwalton

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.

acc
}
}

Copy link
Contributor

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.
bors added a commit that referenced this pull request May 12, 2013
Implemented to_str() for HashMap and HashSet
Added tests.
Minor formatting and stylistic cleanups.
@bors bors closed this May 12, 2013
@bors bors merged commit 0acb6ab into rust-lang:incoming May 12, 2013
@samebchase samebchase deleted the experimental branch May 13, 2013 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants