about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/windows/process.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 9b3f2ca0373..7b667416b17 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -466,19 +466,17 @@ fn free_handle(handle: *mut ()) {
 
 #[cfg(test)]
 mod tests {
-    use c_str::ToCStr;
+    use prelude::v1::*;
+    use str;
+    use ffi::CString;
+    use super::make_command_line;
 
     #[test]
     fn test_make_command_line() {
-        use prelude::v1::*;
-        use str;
-        use c_str::CString;
-        use super::make_command_line;
-
         fn test_wrapper(prog: &str, args: &[&str]) -> String {
-            make_command_line(&prog.to_c_str(),
+            make_command_line(&CString::from_slice(prog.as_bytes()),
                               args.iter()
-                                  .map(|a| a.to_c_str())
+                                  .map(|a| CString::from_slice(a.as_bytes()))
                                   .collect::<Vec<CString>>()
                                   .as_slice())
         }