rust/src/libcollections/btree
Aaron Turon 5fe0bb743a Future-proof indexing on maps: remove IndexMut
This commit removes the `IndexMut` impls on `HashMap` and `BTreeMap`, in
order to future-proof the API against the eventual inclusion of an
`IndexSet` trait.

Ideally, we would eventually be able to support:

```rust
map[owned_key] = val;
map[borrowed_key].mutating_method(arguments);
&mut map[borrowed_key];
```

but to keep the design space as unconstrained as possible, we do not
currently want to support `IndexMut`, in case some other strategy will
eventually be needed.

Code currently using mutating index notation can use `get_mut` instead.

[breaking-change]

Closes #23448
2015-03-20 10:46:31 -07:00
..
map.rs Future-proof indexing on maps: remove IndexMut 2015-03-20 10:46:31 -07:00
mod.rs refactor libcollections as part of collection reform 2014-11-02 18:58:11 -05:00
node.rs Register new snapshots 2015-03-18 16:32:32 -07:00
set.rs extract libcollections tests into libcollectionstest 2015-03-16 21:57:42 -05:00