diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-18 21:41:37 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-19 10:52:59 -0700 |
| commit | 9cf271fe96b474d514b1052935db70c4056cf076 (patch) | |
| tree | 7a6fb31efeaa4de91317c16aca824153aaaf988c /src/cargo | |
| parent | 62b7f4d800325b46002c47d23b58a9f2b7fabb9b (diff) | |
| download | rust-9cf271fe96b474d514b1052935db70c4056cf076.tar.gz rust-9cf271fe96b474d514b1052935db70c4056cf076.zip | |
De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other vec routines.
Diffstat (limited to 'src/cargo')
| -rw-r--r-- | src/cargo/cargo.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cargo/cargo.rs b/src/cargo/cargo.rs index d05a2c2f2b1..94d89adb191 100644 --- a/src/cargo/cargo.rs +++ b/src/cargo/cargo.rs @@ -1502,7 +1502,7 @@ fn print_source(s: source) { print(io::with_str_writer(|writer| { let mut list = ~" >> "; - do vec::iteri(pks) |i, pk| { + for vec::eachi(pks) |i, pk| { if str::len(list) > 78u { writer.write_line(list); list = ~" >> "; @@ -1518,16 +1518,17 @@ fn cmd_list(c: &cargo) { sync(c); if vec::len(c.opts.free) >= 3u { - do vec::iter_between(c.opts.free, 2u, vec::len(c.opts.free)) |name| { - if !valid_pkg_name(name) { - error(fmt!("'%s' is an invalid source name", name)); + let v = vec::view(c.opts.free, 2u, vec::len(c.opts.free)); + for vec::each(v) |name| { + if !valid_pkg_name(*name) { + error(fmt!("'%s' is an invalid source name", *name)); } else { - match c.sources.find(name) { + match c.sources.find(*name) { Some(source) => { print_source(source); } None => { - error(fmt!("no such source: %s", name)); + error(fmt!("no such source: %s", *name)); } } } |
