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_url.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_url.rs')
| -rw-r--r-- | src/libextra/net_url.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libextra/net_url.rs b/src/libextra/net_url.rs index a0ce1669a44..289f3888f63 100644 --- a/src/libextra/net_url.rs +++ b/src/libextra/net_url.rs @@ -519,8 +519,9 @@ fn get_authority(rawurl: &str) -> let end = end; // make end immutable so it can be captured let host_is_end_plus_one: &fn() -> bool = || { + let xs = ['?', '#', '/']; end+1 == len - && !['?', '#', '/'].contains(&(rawurl[end] as char)) + && !xs.iter().any_(|x| *x == (rawurl[end] as char)) }; // finish up |
