diff options
| author | bors <bors@rust-lang.org> | 2014-04-18 11:41:23 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-18 11:41:23 -0700 |
| commit | d1d8497e53af86687e701eea0fe2a41b0c4313eb (patch) | |
| tree | ac2ffc0405647555976c3b6b90e98a4e9398eb11 /src/libstd/rt | |
| parent | ce2bab68d69ee04e17c0165dbdb7b583d5a7c991 (diff) | |
| parent | 675b82657e7d9fd4c824ff3c6dbead1edd1ab515 (diff) | |
| download | rust-d1d8497e53af86687e701eea0fe2a41b0c4313eb.tar.gz rust-d1d8497e53af86687e701eea0fe2a41b0c4313eb.zip | |
auto merge of #13588 : alexcrichton/rust/no-more-growing, r=thestinger
This is all in preparation for DST. This removes all the growable/shrinkable methods from `~[T]`.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/args.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index 328de696914..abe2e2ab1dc 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -125,13 +125,14 @@ mod imp { unsafe fn load_argc_and_argv(argc: int, argv: **u8) -> ~[~[u8]] { use c_str::CString; use ptr::RawPtr; - use {slice, libc}; + use libc; use slice::CloneableVector; + use vec::Vec; - slice::from_fn(argc as uint, |i| { + Vec::from_fn(argc as uint, |i| { let cs = CString::new(*(argv as **libc::c_char).offset(i as int), false); cs.as_bytes_no_nul().to_owned() - }) + }).move_iter().collect() } #[cfg(test)] |
