about summary refs log tree commit diff
path: root/src/libstd/num
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/libstd/num
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/libstd/num')
-rw-r--r--src/libstd/num/strconv.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 6e0d81a63c9..f79cda0195e 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -424,10 +424,10 @@ pub fn float_to_str_bytes_common<T:NumCast+Zero+One+PartialEq+PartialOrd+Float+
                     // or set to 0 if max and carry the 1.
                     let current_digit = ascii2value(buf[i as uint]);
                     if current_digit < (radix - 1) {
-                        *buf.get_mut(i as uint) = value2ascii(current_digit+1);
+                        buf[i as uint] = value2ascii(current_digit+1);
                         break;
                     } else {
-                        *buf.get_mut(i as uint) = value2ascii(0);
+                        buf[i as uint] = value2ascii(0);
                         i -= 1;
                     }
                 }