diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-06-21 08:29:53 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-06-23 02:05:20 -0400 |
| commit | d2e9912aea87f9b1812a0f44e093c0405848f7ce (patch) | |
| tree | a872d8f5ab40841274cbb777c642d3b6c9036a87 /src/libstd/path.rs | |
| parent | c9342663df3e705f6fe380f3d4f46c4a7be8035e (diff) | |
| download | rust-d2e9912aea87f9b1812a0f44e093c0405848f7ce.tar.gz rust-d2e9912aea87f9b1812a0f44e093c0405848f7ce.zip | |
vec: remove BaseIter implementation
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index d7812bf49c2..700bfff3f5d 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -25,8 +25,7 @@ use str; use str::{Str, StrSlice, StrVector}; use to_str::ToStr; use ascii::{AsciiCast, AsciiStr}; -use old_iter::BaseIter; -use vec::OwnedVector; +use vec::{OwnedVector, ImmutableVector}; #[cfg(windows)] pub use Path = self::WindowsPath; @@ -596,7 +595,7 @@ impl GenericPath for PosixPath { fn push_many<S: Str>(&self, cs: &[S]) -> PosixPath { let mut v = copy self.components; - for cs.each |e| { + for cs.iter().advance |e| { for e.as_slice().split_iter(windows::is_sep).advance |s| { if !s.is_empty() { v.push(s.to_owned()) @@ -853,7 +852,7 @@ impl GenericPath for WindowsPath { fn push_many<S: Str>(&self, cs: &[S]) -> WindowsPath { let mut v = copy self.components; - for cs.each |e| { + for cs.iter().advance |e| { for e.as_slice().split_iter(windows::is_sep).advance |s| { if !s.is_empty() { v.push(s.to_owned()) @@ -915,7 +914,7 @@ impl GenericPath for WindowsPath { pub fn normalize(components: &[~str]) -> ~[~str] { let mut cs = ~[]; - for components.each |c| { + for components.iter().advance |c| { if *c == ~"." && components.len() > 1 { loop; } if *c == ~"" { loop; } if *c == ~".." && cs.len() != 0 { |
