diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-06-17 19:43:22 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-06-21 03:20:22 -0400 |
| commit | 49c74524e2c5a2a81ce4cbe2c50a507c0be9f24e (patch) | |
| tree | 441c718864c414bd4f7750c2435edc100e4a1841 /src/libextra/net_ip.rs | |
| parent | cbad1da3db7eda0911e988fb6255ac5c16961aa7 (diff) | |
vec: rm old_iter implementations, except BaseIter
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
Diffstat (limited to 'src/libextra/net_ip.rs')
| -rw-r--r-- | src/libextra/net_ip.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libextra/net_ip.rs b/src/libextra/net_ip.rs index 518a9d8685a..91c357088c9 100644 --- a/src/libextra/net_ip.rs +++ b/src/libextra/net_ip.rs @@ -205,7 +205,7 @@ pub mod v4 { }).collect(); if parts.len() != 4 { Err(fmt!("'%s' doesn't have 4 parts", ip)) - } else if parts.contains(&256) { + } else if parts.iter().any_(|x| *x == 256u) { Err(fmt!("invalid octal in addr '%s'", ip)) } else { Ok(Ipv4Rep { |
