diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-02-01 21:53:25 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-02-05 13:45:01 -0500 |
| commit | 17bc7d8d5be3be9674d702ccad2fa88c487d23b0 (patch) | |
| tree | 325defba0f55b48273cd3f0814fe6c083dee5d41 /src/libstd/sys/windows/process.rs | |
| parent | 2c05354211b04a52cc66a0b8ad8b2225eaf9e972 (diff) | |
| download | rust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.tar.gz rust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.zip | |
cleanup: replace `as[_mut]_slice()` calls with deref coercions
Diffstat (limited to 'src/libstd/sys/windows/process.rs')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 839263f1f17..eab60047aa2 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -389,7 +389,7 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String { } let argvec: Vec<char> = arg.chars().collect(); for i in 0u..argvec.len() { - append_char_at(cmd, argvec.as_slice(), i); + append_char_at(cmd, &argvec, i); } if quote { cmd.push('"'); @@ -485,10 +485,9 @@ mod tests { fn test_make_command_line() { fn test_wrapper(prog: &str, args: &[&str]) -> String { make_command_line(&CString::from_slice(prog.as_bytes()), - args.iter() - .map(|a| CString::from_slice(a.as_bytes())) - .collect::<Vec<CString>>() - .as_slice()) + &args.iter() + .map(|a| CString::from_slice(a.as_bytes())) + .collect::<Vec<CString>>()) } assert_eq!( |
