From 1bde6e3fcb32ca00cf8a8dfa0977e47f7f4a77bf Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Thu, 5 Jun 2014 23:18:51 -0700 Subject: Rename Iterator::len to count This commit carries out the request from issue #14678: > The method `Iterator::len()` is surprising, as all the other uses of > `len()` do not consume the value. `len()` would make more sense to be > called `count()`, but that would collide with the current > `Iterator::count(|T| -> bool) -> unit` method. That method, however, is > a bit redundant, and can be easily replaced with > `iter.filter(|x| x < 5).count()`. > After this change, we could then define the `len()` method > on `iter::ExactSize`. Closes #14678. [breaking-change] --- src/libstd/num/strconv.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/libstd/num') diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 54ca5797804..133a8db90fa 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -13,7 +13,6 @@ use char; use clone::Clone; use container::Container; -use iter::Iterator; use num::{NumCast, Zero, One, cast, Int}; use num::{Float, FPNaN, FPInfinite, ToPrimitive}; use num; -- cgit 1.4.1-3-g733a5