diff options
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 9 | ||||
| -rw-r--r-- | src/libstd/sys/windows/tty.rs | 2 |
2 files changed, 5 insertions, 6 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!( diff --git a/src/libstd/sys/windows/tty.rs b/src/libstd/sys/windows/tty.rs index f02c8e49f41..8a8b5309057 100644 --- a/src/libstd/sys/windows/tty.rs +++ b/src/libstd/sys/windows/tty.rs @@ -104,7 +104,7 @@ impl TTY { _ => (), }; utf16.truncate(num as uint); - let utf8 = match String::from_utf16(utf16.as_slice()) { + let utf8 = match String::from_utf16(&utf16) { Ok(utf8) => utf8.into_bytes(), Err(..) => return Err(invalid_encoding()), }; |
