Skip to content
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

Add pop() and swap() to the Map trait #6236

Merged
merged 1 commit into from
May 7, 2013

Conversation

alexcrichton
Copy link
Member

Closes #5392 and #5393

I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation.

One thing I did notice is that with default methods it'd be really nice to define insert and remove in terms of pop and swap (or vice versa, just to have them available).

bors added a commit that referenced this pull request May 7, 2013
Closes #5392 and #5393

I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation.

One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
@bors bors closed this May 7, 2013
@bors bors merged commit 393a409 into rust-lang:incoming May 7, 2013
@alexcrichton alexcrichton deleted the more-map-methods branch May 7, 2013 15:08
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 20, 2020
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 20, 2020
Fix vec_box scope error

changelog: Fix vec_box suggestion with wrong type scope

Fixes rust-lang#6236
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.

None yet

3 participants