about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/libstd/collections
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index f9558b85825..76d7570bfed 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -505,7 +505,7 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomState> {
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::new();
+    /// let mut map: HashMap<&str, isize> = HashMap::new();
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -519,7 +519,7 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomState> {
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::with_capacity(10);
+    /// let mut map: HashMap<&str, isize> = HashMap::with_capacity(10);
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -596,7 +596,7 @@ impl<K, V, S> HashMap<K, V, S>
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let map: HashMap<int, int> = HashMap::with_capacity(100);
+    /// let map: HashMap<isize, isize> = HashMap::with_capacity(100);
     /// assert!(map.capacity() >= 100);
     /// ```
     #[inline]
@@ -617,7 +617,7 @@ impl<K, V, S> HashMap<K, V, S>
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::new();
+    /// let mut map: HashMap<&str, isize> = HashMap::new();
     /// map.reserve(10);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -725,7 +725,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// ```
     /// use std::collections::HashMap;
     ///
-    /// let mut map: HashMap<int, int> = HashMap::with_capacity(100);
+    /// let mut map: HashMap<isize, isize> = HashMap::with_capacity(100);
     /// map.insert(1, 2);
     /// map.insert(3, 4);
     /// assert!(map.capacity() >= 100);
@@ -797,9 +797,9 @@ impl<K, V, S> HashMap<K, V, S>
                 }
             }
 
-            let robin_ib = bucket.index() as int - bucket.distance() as int;
+            let robin_ib = bucket.index() as isize - bucket.distance() as isize;
 
-            if (ib as int) < robin_ib {
+            if (ib as isize) < robin_ib {
                 // Found a luckier bucket than me. Better steal his spot.
                 return robin_hood(bucket, robin_ib as usize, hash, k, v);
             }
@@ -924,7 +924,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// map.insert("c", 3);
     ///
     /// // Not possible with .iter()
-    /// let vec: Vec<(&str, int)> = map.into_iter().collect();
+    /// let vec: Vec<(&str, isize)> = map.into_iter().collect();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_iter(self) -> IntoIter<K, V> {
@@ -1188,9 +1188,9 @@ fn search_entry_hashed<'a, K: Eq, V>(table: &'a mut RawTable<K,V>, hash: SafeHas
             }
         }
 
-        let robin_ib = bucket.index() as int - bucket.distance() as int;
+        let robin_ib = bucket.index() as isize - bucket.distance() as isize;
 
-        if (ib as int) < robin_ib {
+        if (ib as isize) < robin_ib {
             // Found a luckier bucket than me. Better steal his spot.
             return Vacant(VacantEntry {
                 hash: hash,
@@ -1648,7 +1648,7 @@ mod test_map {
         assert_eq!(*m.get(&2).unwrap(), 4);
     }
 
-    thread_local! { static DROP_VECTOR: RefCell<Vec<int>> = RefCell::new(Vec::new()) }
+    thread_local! { static DROP_VECTOR: RefCell<Vec<isize>> = RefCell::new(Vec::new()) }
 
     #[derive(Hash, PartialEq, Eq)]
     struct Dropable {
@@ -1805,7 +1805,7 @@ mod test_map {
 
     #[test]
     fn test_empty_pop() {
-        let mut m: HashMap<int, bool> = HashMap::new();
+        let mut m: HashMap<isize, bool> = HashMap::new();
         assert_eq!(m.remove(&0), None);
     }