mozilla/rust — pull request #6236 by alexcrichton (2013-05-04 14:17:37+00:00)
Title: Add pop() and swap() to the Map trait

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).