about summary refs log tree commit diff
path: root/src/libcollections/binary_heap.rs
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2015-01-25 22:05:03 +0100
committerTobias Bucher <tobiasbucher5991@gmail.com>2015-01-30 04:38:54 +0100
commit7f64fe4e27555c256cb228feb05d4181a2287125 (patch)
treec1fd374d345905c7c4c9b1e7df160d3394edbec5 /src/libcollections/binary_heap.rs
parent52c74e63dacd49017b19330e0cbecbac0a3fe62e (diff)
downloadrust-7f64fe4e27555c256cb228feb05d4181a2287125.tar.gz
rust-7f64fe4e27555c256cb228feb05d4181a2287125.zip
Remove all `i` suffixes
Diffstat (limited to 'src/libcollections/binary_heap.rs')
-rw-r--r--src/libcollections/binary_heap.rs76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs
index f717fc6075d..91ef2d17baa 100644
--- a/src/libcollections/binary_heap.rs
+++ b/src/libcollections/binary_heap.rs
@@ -212,7 +212,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// ```
     /// use std::collections::BinaryHeap;
-    /// let heap = BinaryHeap::from_vec(vec![9i, 1, 2, 7, 3, 2]);
+    /// let heap = BinaryHeap::from_vec(vec![9, 1, 2, 7, 3, 2]);
     /// ```
     pub fn from_vec(vec: Vec<T>) -> BinaryHeap<T> {
         let mut heap = BinaryHeap { data: vec };
@@ -231,7 +231,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// ```
     /// use std::collections::BinaryHeap;
-    /// let heap = BinaryHeap::from_vec(vec![1i, 2, 3, 4]);
+    /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]);
     ///
     /// // Print 1, 2, 3, 4 in arbitrary order
     /// for x in heap.iter() {
@@ -251,7 +251,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// ```
     /// use std::collections::BinaryHeap;
-    /// let heap = BinaryHeap::from_vec(vec![1i, 2, 3, 4]);
+    /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]);
     ///
     /// // Print 1, 2, 3, 4 in arbitrary order
     /// for x in heap.into_iter() {
@@ -273,7 +273,7 @@ impl<T: Ord> BinaryHeap<T> {
     /// let mut heap = BinaryHeap::new();
     /// assert_eq!(heap.peek(), None);
     ///
-    /// heap.push(1i);
+    /// heap.push(1);
     /// heap.push(5);
     /// heap.push(2);
     /// assert_eq!(heap.peek(), Some(&5));
@@ -356,7 +356,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// ```
     /// use std::collections::BinaryHeap;
-    /// let mut heap = BinaryHeap::from_vec(vec![1i, 3]);
+    /// let mut heap = BinaryHeap::from_vec(vec![1, 3]);
     ///
     /// assert_eq!(heap.pop(), Some(3));
     /// assert_eq!(heap.pop(), Some(1));
@@ -380,7 +380,7 @@ impl<T: Ord> BinaryHeap<T> {
     /// ```
     /// use std::collections::BinaryHeap;
     /// let mut heap = BinaryHeap::new();
-    /// heap.push(3i);
+    /// heap.push(3);
     /// heap.push(5);
     /// heap.push(1);
     ///
@@ -402,7 +402,7 @@ impl<T: Ord> BinaryHeap<T> {
     /// ```
     /// use std::collections::BinaryHeap;
     /// let mut heap = BinaryHeap::new();
-    /// heap.push(1i);
+    /// heap.push(1);
     /// heap.push(5);
     ///
     /// assert_eq!(heap.push_pop(3), 5);
@@ -434,7 +434,7 @@ impl<T: Ord> BinaryHeap<T> {
     /// use std::collections::BinaryHeap;
     /// let mut heap = BinaryHeap::new();
     ///
-    /// assert_eq!(heap.replace(1i), None);
+    /// assert_eq!(heap.replace(1), None);
     /// assert_eq!(heap.replace(3), Some(1));
     /// assert_eq!(heap.len(), 1);
     /// assert_eq!(heap.peek(), Some(&3));
@@ -457,7 +457,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// ```
     /// use std::collections::BinaryHeap;
-    /// let heap = BinaryHeap::from_vec(vec![1i, 2, 3, 4, 5, 6, 7]);
+    /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4, 5, 6, 7]);
     /// let vec = heap.into_vec();
     ///
     /// // Will print in some order
@@ -475,12 +475,12 @@ impl<T: Ord> BinaryHeap<T> {
     /// ```
     /// use std::collections::BinaryHeap;
     ///
-    /// let mut heap = BinaryHeap::from_vec(vec![1i, 2, 4, 5, 7]);
+    /// let mut heap = BinaryHeap::from_vec(vec![1, 2, 4, 5, 7]);
     /// heap.push(6);
     /// heap.push(3);
     ///
     /// let vec = heap.into_sorted_vec();
-    /// assert_eq!(vec, vec![1i, 2, 3, 4, 5, 6, 7]);
+    /// assert_eq!(vec, vec![1, 2, 3, 4, 5, 6, 7]);
     /// ```
     pub fn into_sorted_vec(mut self) -> Vec<T> {
         let mut end = self.len();
@@ -676,8 +676,8 @@ mod tests {
 
     #[test]
     fn test_iterator() {
-        let data = vec!(5i, 9, 3);
-        let iterout = [9i, 5, 3];
+        let data = vec!(5, 9, 3);
+        let iterout = [9, 5, 3];
         let heap = BinaryHeap::from_vec(data);
         let mut i = 0;
         for el in heap.iter() {
@@ -688,8 +688,8 @@ mod tests {
 
     #[test]
     fn test_iterator_reverse() {
-        let data = vec!(5i, 9, 3);
-        let iterout = vec!(3i, 5, 9);
+        let data = vec!(5, 9, 3);
+        let iterout = vec!(3, 5, 9);
         let pq = BinaryHeap::from_vec(data);
 
         let v: Vec<int> = pq.iter().rev().map(|&x| x).collect();
@@ -698,8 +698,8 @@ mod tests {
 
     #[test]
     fn test_move_iter() {
-        let data = vec!(5i, 9, 3);
-        let iterout = vec!(9i, 5, 3);
+        let data = vec!(5, 9, 3);
+        let iterout = vec!(9, 5, 3);
         let pq = BinaryHeap::from_vec(data);
 
         let v: Vec<int> = pq.into_iter().collect();
@@ -708,16 +708,16 @@ mod tests {
 
     #[test]
     fn test_move_iter_size_hint() {
-        let data = vec!(5i, 9);
+        let data = vec!(5, 9);
         let pq = BinaryHeap::from_vec(data);
 
         let mut it = pq.into_iter();
 
         assert_eq!(it.size_hint(), (2, Some(2)));
-        assert_eq!(it.next(), Some(9i));
+        assert_eq!(it.next(), Some(9));
 
         assert_eq!(it.size_hint(), (1, Some(1)));
-        assert_eq!(it.next(), Some(5i));
+        assert_eq!(it.next(), Some(5));
 
         assert_eq!(it.size_hint(), (0, Some(0)));
         assert_eq!(it.next(), None);
@@ -725,8 +725,8 @@ mod tests {
 
     #[test]
     fn test_move_iter_reverse() {
-        let data = vec!(5i, 9, 3);
-        let iterout = vec!(3i, 5, 9);
+        let data = vec!(5, 9, 3);
+        let iterout = vec!(3, 5, 9);
         let pq = BinaryHeap::from_vec(data);
 
         let v: Vec<int> = pq.into_iter().rev().collect();
@@ -747,7 +747,7 @@ mod tests {
 
     #[test]
     fn test_push() {
-        let mut heap = BinaryHeap::from_vec(vec!(2i, 4, 9));
+        let mut heap = BinaryHeap::from_vec(vec!(2, 4, 9));
         assert_eq!(heap.len(), 3);
         assert!(*heap.peek().unwrap() == 9);
         heap.push(11);
@@ -769,7 +769,7 @@ mod tests {
 
     #[test]
     fn test_push_unique() {
-        let mut heap = BinaryHeap::from_vec(vec!(box 2i, box 4, box 9));
+        let mut heap = BinaryHeap::from_vec(vec!(box 2, box 4, box 9));
         assert_eq!(heap.len(), 3);
         assert!(*heap.peek().unwrap() == box 9);
         heap.push(box 11);
@@ -791,7 +791,7 @@ mod tests {
 
     #[test]
     fn test_push_pop() {
-        let mut heap = BinaryHeap::from_vec(vec!(5i, 5, 2, 1, 3));
+        let mut heap = BinaryHeap::from_vec(vec!(5, 5, 2, 1, 3));
         assert_eq!(heap.len(), 5);
         assert_eq!(heap.push_pop(6), 6);
         assert_eq!(heap.len(), 5);
@@ -805,7 +805,7 @@ mod tests {
 
     #[test]
     fn test_replace() {
-        let mut heap = BinaryHeap::from_vec(vec!(5i, 5, 2, 1, 3));
+        let mut heap = BinaryHeap::from_vec(vec!(5, 5, 2, 1, 3));
         assert_eq!(heap.len(), 5);
         assert_eq!(heap.replace(6).unwrap(), 5);
         assert_eq!(heap.len(), 5);
@@ -830,18 +830,18 @@ mod tests {
     #[test]
     fn test_to_vec() {
         check_to_vec(vec!());
-        check_to_vec(vec!(5i));
-        check_to_vec(vec!(3i, 2));
-        check_to_vec(vec!(2i, 3));
-        check_to_vec(vec!(5i, 1, 2));
-        check_to_vec(vec!(1i, 100, 2, 3));
-        check_to_vec(vec!(1i, 3, 5, 7, 9, 2, 4, 6, 8, 0));
-        check_to_vec(vec!(2i, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1));
-        check_to_vec(vec!(9i, 11, 9, 9, 9, 9, 11, 2, 3, 4, 11, 9, 0, 0, 0, 0));
-        check_to_vec(vec!(0i, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
-        check_to_vec(vec!(10i, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0));
-        check_to_vec(vec!(0i, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 1, 2));
-        check_to_vec(vec!(5i, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1));
+        check_to_vec(vec!(5));
+        check_to_vec(vec!(3, 2));
+        check_to_vec(vec!(2, 3));
+        check_to_vec(vec!(5, 1, 2));
+        check_to_vec(vec!(1, 100, 2, 3));
+        check_to_vec(vec!(1, 3, 5, 7, 9, 2, 4, 6, 8, 0));
+        check_to_vec(vec!(2, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1));
+        check_to_vec(vec!(9, 11, 9, 9, 9, 9, 11, 2, 3, 4, 11, 9, 0, 0, 0, 0));
+        check_to_vec(vec!(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
+        check_to_vec(vec!(10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0));
+        check_to_vec(vec!(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 1, 2));
+        check_to_vec(vec!(5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1));
     }
 
     #[test]