about summary refs log tree commit diff
path: root/src/libsyntax/ast_map
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-23 08:42:21 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-30 08:54:30 -0700
commit1d356624a1c03363be37886ffdad7dcf25ee81f6 (patch)
tree4aef71be9e3f509b1bc8b4880e6894656e6404c4 /src/libsyntax/ast_map
parent18a3db6aa1ce9e66b0c9cb776588d56470c6078b (diff)
downloadrust-1d356624a1c03363be37886ffdad7dcf25ee81f6.tar.gz
rust-1d356624a1c03363be37886ffdad7dcf25ee81f6.zip
collections: Enable IndexMut for some collections
This commit enables implementations of IndexMut for a number of collections,
including Vec, RingBuf, SmallIntMap, TrieMap, TreeMap, and HashMap. At the same
time this deprecates the `get_mut` methods on vectors in favor of using the
indexing notation.

cc #18424
Diffstat (limited to 'src/libsyntax/ast_map')
-rw-r--r--src/libsyntax/ast_map/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs
index 915c2d1b318..fa36577ebdb 100644
--- a/src/libsyntax/ast_map/mod.rs
+++ b/src/libsyntax/ast_map/mod.rs
@@ -712,7 +712,7 @@ impl<'ast> NodeCollector<'ast> {
         if id as uint >= len {
             self.map.grow(id as uint - len + 1, NotPresent);
         }
-        *self.map.get_mut(id as uint) = entry;
+        self.map[id as uint] = entry;
     }
 
     fn insert(&mut self, id: NodeId, node: Node<'ast>) {