]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/vec_map.rs
make `IndexMut` a super trait over `Index`
[rust.git] / src / libcollections / vec_map.rs
index 1bb9fcf81925692c815e8fd70d4484ef75b1a108..739b8d8ce19c24899abcd9d06f2a25d62d848623 100644 (file)
@@ -712,8 +712,6 @@ fn index<'a>(&'a self, i: &usize) -> &'a V {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<V> IndexMut<usize> for VecMap<V> {
-    type Output = V;
-
     #[inline]
     fn index_mut<'a>(&'a mut self, i: &usize) -> &'a mut V {
         self.get_mut(i).expect("key not present")
@@ -915,7 +913,8 @@ mod test_map {
     use prelude::*;
     use core::hash::{hash, SipHasher};
 
-    use super::{VecMap, Occupied, Vacant};
+    use super::VecMap;
+    use super::Entry::{Occupied, Vacant};
 
     #[test]
     fn test_get_mut() {
@@ -1053,7 +1052,7 @@ fn test_mut_iterator() {
         assert!(m.insert(10, 11).is_none());
 
         for (k, v) in &mut m {
-            *v += k as int;
+            *v += k as isize;
         }
 
         let mut it = m.iter();
@@ -1095,7 +1094,7 @@ fn test_mut_rev_iterator() {
         assert!(m.insert(10, 11).is_none());
 
         for (k, v) in m.iter_mut().rev() {
-            *v += k as int;
+            *v += k as isize;
         }
 
         let mut it = m.iter();