about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-31 18:59:36 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-01 00:36:26 -0700
commit8dff0ac143a689b7a1e04e55273d3f006b8369d1 (patch)
treed8c010a3bf50657f6ffe46410948f7e53d81f72f /src/libstd/sys
parent6ebb6e60b978ae3b27a0861d6d8eace03c7fce93 (diff)
downloadrust-8dff0ac143a689b7a1e04e55273d3f006b8369d1.tar.gz
rust-8dff0ac143a689b7a1e04e55273d3f006b8369d1.zip
Test fixes and rebase conflicts
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/windows/fs.rs7
-rw-r--r--src/libstd/sys/windows/process.rs4
-rw-r--r--src/libstd/sys/windows/process2.rs7
3 files changed, 12 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index f534a33d8cc..0bbb1a9e927 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -135,6 +135,13 @@ impl FileDesc {
             _ => Err(super::last_error()),
         }
     }
+
+    #[allow(dead_code)]
+    pub fn unwrap(self) -> fd_t {
+        let fd = self.fd;
+        unsafe { mem::forget(self) };
+        fd
+    }
 }
 
 impl Drop for FileDesc {
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 414083bc41f..b10042090dd 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -487,9 +487,9 @@ mod tests {
     #[test]
     fn test_make_command_line() {
         fn test_wrapper(prog: &str, args: &[&str]) -> String {
-            make_command_line(&CString::new(prog),
+            make_command_line(&CString::new(prog).unwrap(),
                               &args.iter()
-                                   .map(|a| CString::new(a))
+                                   .map(|a| CString::new(*a).unwrap())
                                    .collect::<Vec<CString>>())
         }
 
diff --git a/src/libstd/sys/windows/process2.rs b/src/libstd/sys/windows/process2.rs
index 9e9bb86446e..7e832b6384d 100644
--- a/src/libstd/sys/windows/process2.rs
+++ b/src/libstd/sys/windows/process2.rs
@@ -445,10 +445,9 @@ mod tests {
         fn test_wrapper(prog: &str, args: &[&str]) -> String {
             String::from_utf16(
                 &make_command_line(OsStr::from_str(prog),
-                                   args.iter()
-                                       .map(|a| OsString::from_str(a))
-                                       .collect::<Vec<OsString>>()
-                                       .as_slice())).unwrap()
+                                   &args.iter()
+                                        .map(|a| OsString::from(a))
+                                        .collect::<Vec<OsString>>())).unwrap()
         }
 
         assert_eq!(