diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-08-01 03:16:42 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-08-01 05:34:55 -0400 |
| commit | 1fc4db2d086fd068a934c9ed2ccf25456fedc216 (patch) | |
| tree | 8e96cbc62b80bd622f78cf68b0bb29cb14ebc417 /src/librustpkg/package_source.rs | |
| parent | 5f59c46e0f5605a0cc90ebdb26b4d258a8f7b43a (diff) | |
| download | rust-1fc4db2d086fd068a934c9ed2ccf25456fedc216.tar.gz rust-1fc4db2d086fd068a934c9ed2ccf25456fedc216.zip | |
migrate many `for` loops to `foreach`
Diffstat (limited to 'src/librustpkg/package_source.rs')
| -rw-r--r-- | src/librustpkg/package_source.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs index 3b3f08baa7e..07e8de35fd6 100644 --- a/src/librustpkg/package_source.rs +++ b/src/librustpkg/package_source.rs @@ -135,7 +135,7 @@ impl PkgSrc { return true; } else { - for self_id.iter().advance |pth| { + foreach pth in self_id.iter() { if pth.starts_with("rust_") // because p is already normalized && match p.filestem() { Some(s) => str::eq_slice(s, pth.slice(5, pth.len())), @@ -149,7 +149,7 @@ impl PkgSrc { fn push_crate(cs: &mut ~[Crate], prefix: uint, p: &Path) { assert!(p.components.len() > prefix); let mut sub = Path(""); - for p.components.slice(prefix, p.components.len()).iter().advance |c| { + foreach c in p.components.slice(prefix, p.components.len()).iter() { sub = sub.push(*c); } debug!("found crate %s", sub.to_str()); @@ -206,7 +206,7 @@ impl PkgSrc { crates: &[Crate], cfgs: &[~str], what: OutputType) { - for crates.iter().advance |crate| { + foreach crate in crates.iter() { let path = &src_dir.push_rel(&crate.file).normalize(); note(fmt!("build_crates: compiling %s", path.to_str())); note(fmt!("build_crates: destination dir is %s", dst_dir.to_str())); |
