-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 swap method to the Map trait #5392
Comments
ghost
assigned thestinger
Mar 15, 2013
A function along the lines of |
bors
added a commit
that referenced
this issue
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).
Closed in #6236 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 2, 2020
rustup rust-lang#70536 changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Like
insert
, but returning the value that was replaced if applicable.The text was updated successfully, but these errors were encountered: