about summary refs log tree commit diff
path: root/src/libstd/iterator.rs
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-09 20:30:03 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-10 07:33:22 -0700
commitf9dee04aaabc0ee38f91744e07fe67f36ec6c8e9 (patch)
tree8f4c820450000fe20dc036db485afed156e9e0a9 /src/libstd/iterator.rs
parent74d2552b0ab671a7455b5a60972c0cc6e3ecdb82 (diff)
downloadrust-f9dee04aaabc0ee38f91744e07fe67f36ec6c8e9.tar.gz
rust-f9dee04aaabc0ee38f91744e07fe67f36ec6c8e9.zip
std: Iterator.len_ -> .len
Diffstat (limited to 'src/libstd/iterator.rs')
-rw-r--r--src/libstd/iterator.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs
index 811adb53cb4..dc9550f6e4d 100644
--- a/src/libstd/iterator.rs
+++ b/src/libstd/iterator.rs
@@ -409,7 +409,6 @@ pub trait Iterator<A> {
         accum
     }
 
-    // FIXME: #5898: should be called len
     /// Counts the number of elements in this iterator.
     ///
     /// # Example
@@ -417,11 +416,11 @@ pub trait Iterator<A> {
     /// ~~~ {.rust}
     /// let a = [1, 2, 3, 4, 5];
     /// let mut it = a.iter();
-    /// assert!(it.len_() == 5);
-    /// assert!(it.len_() == 0);
+    /// assert!(it.len() == 5);
+    /// assert!(it.len() == 0);
     /// ~~~
     #[inline]
-    fn len_(&mut self) -> uint {
+    fn len(&mut self) -> uint {
         self.fold(0, |cnt, _x| cnt + 1)
     }
 
@@ -1718,9 +1717,9 @@ mod tests {
     #[test]
     fn test_iterator_len() {
         let v = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-        assert_eq!(v.slice(0, 4).iter().len_(), 4);
-        assert_eq!(v.slice(0, 10).iter().len_(), 10);
-        assert_eq!(v.slice(0, 0).iter().len_(), 0);
+        assert_eq!(v.slice(0, 4).iter().len(), 4);
+        assert_eq!(v.slice(0, 10).iter().len(), 10);
+        assert_eq!(v.slice(0, 0).iter().len(), 0);
     }
 
     #[test]