diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-08-03 12:45:23 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-08-03 22:48:02 -0400 |
| commit | 10089455287dcc3652b984ab4bfd6971e1b5f302 (patch) | |
| tree | a9570eacf4ff89a1f14b7380c080af77918589f6 /src/libstd/path.rs | |
| parent | 9f74217d80290d1cb36afcaf68a566b4b4907d27 (diff) | |
| download | rust-10089455287dcc3652b984ab4bfd6971e1b5f302.tar.gz rust-10089455287dcc3652b984ab4bfd6971e1b5f302.zip | |
remove obsolete `foreach` keyword
this has been replaced by `for`
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 989a5cbd35b..76001ae4188 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -647,8 +647,8 @@ impl GenericPath for PosixPath { fn push_many<S: Str>(&self, cs: &[S]) -> PosixPath { let mut v = self.components.clone(); - foreach e in cs.iter() { - foreach s in e.as_slice().split_iter(posix::is_sep) { + for e in cs.iter() { + for s in e.as_slice().split_iter(posix::is_sep) { if !s.is_empty() { v.push(s.to_owned()) } @@ -662,7 +662,7 @@ impl GenericPath for PosixPath { fn push(&self, s: &str) -> PosixPath { let mut v = self.components.clone(); - foreach s in s.split_iter(posix::is_sep) { + for s in s.split_iter(posix::is_sep) { if !s.is_empty() { v.push(s.to_owned()) } @@ -922,8 +922,8 @@ impl GenericPath for WindowsPath { fn push_many<S: Str>(&self, cs: &[S]) -> WindowsPath { let mut v = self.components.clone(); - foreach e in cs.iter() { - foreach s in e.as_slice().split_iter(windows::is_sep) { + for e in cs.iter() { + for s in e.as_slice().split_iter(windows::is_sep) { if !s.is_empty() { v.push(s.to_owned()) } @@ -940,7 +940,7 @@ impl GenericPath for WindowsPath { fn push(&self, s: &str) -> WindowsPath { let mut v = self.components.clone(); - foreach s in s.split_iter(windows::is_sep) { + for s in s.split_iter(windows::is_sep) { if !s.is_empty() { v.push(s.to_owned()) } @@ -989,7 +989,7 @@ impl GenericPath for WindowsPath { pub fn normalize(components: &[~str]) -> ~[~str] { let mut cs = ~[]; - foreach c in components.iter() { + for c in components.iter() { if *c == ~"." && components.len() > 1 { loop; } if *c == ~"" { loop; } if *c == ~".." && cs.len() != 0 { |
