diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-09 23:10:50 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-10 23:02:54 +1000 |
| commit | 1e8982bdb26208d9d9ed4cdcbcd21cc9ef35bd46 (patch) | |
| tree | 54f03a318e14bcdbdb56e01b3c80d00a9db87a17 /src/librustpkg/rustpkg.rc | |
| parent | 2ff6b298c5f23f48aa993fced41b6e29e446b7ce (diff) | |
| download | rust-1e8982bdb26208d9d9ed4cdcbcd21cc9ef35bd46.tar.gz rust-1e8982bdb26208d9d9ed4cdcbcd21cc9ef35bd46.zip | |
std: replace str::each_split* with an iterator
Diffstat (limited to 'src/librustpkg/rustpkg.rc')
| -rw-r--r-- | src/librustpkg/rustpkg.rc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc index 37b8c2ad433..2db51fe969f 100644 --- a/src/librustpkg/rustpkg.rc +++ b/src/librustpkg/rustpkg.rc @@ -29,6 +29,7 @@ extern mod syntax; use core::prelude::*; use core::*; +use core::iterator::IteratorUtil; pub use core::path::Path; use core::hashmap::HashMap; use rustc::driver::{driver, session}; @@ -161,10 +162,8 @@ impl<'self> PkgScript<'self> { exe.to_str(), root.to_str(), "configs"); let output = run::process_output(exe.to_str(), [root.to_str(), ~"configs"]); // Run the configs() function to get the configs - let mut cfgs = ~[]; - for str::each_word(str::from_bytes(output.output)) |w| { - cfgs.push(w.to_owned()); - } + let cfgs = str::from_bytes_slice(output.output).word_iter() + .transform(|w| w.to_owned()).collect(); (cfgs, output.status) } } |
