diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 18:51:51 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 18:51:51 -0800 |
| commit | 67d13883f868e6b27aa00a6c69f7c748d16e1c94 (patch) | |
| tree | 195395a9e6d556c7c60a1507376a75e9e0c348bb /src/libstd/rt | |
| parent | dd0f29ad0f3ddc48f36340cd0abff4712e882a3e (diff) | |
| parent | 6abfac083feafc73e5d736177755cce3bfb7153f (diff) | |
| download | rust-67d13883f868e6b27aa00a6c69f7c748d16e1c94.tar.gz rust-67d13883f868e6b27aa00a6c69f7c748d16e1c94.zip | |
rollup merge of #20061: aturon/stab-2-vec-slice
Conflicts: src/libcollections/slice.rs src/libcollections/vec.rs src/libstd/sys/windows/os.rs
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/args.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index b1f268597c7..98eff621ce0 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -95,14 +95,14 @@ mod imp { } unsafe fn load_argc_and_argv(argc: int, argv: *const *const u8) -> Vec<Vec<u8>> { - Vec::from_fn(argc as uint, |i| { + range(0, argc as uint).map(|i| { let arg = *argv.offset(i as int); let mut len = 0u; while *arg.offset(len as int) != 0 { len += 1u; } slice::from_raw_buf(&arg, len).to_vec() - }) + }).collect() } #[cfg(test)] |
