about summary refs log tree commit diff
path: root/src/libstd/sys/unix/os.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-25 14:14:04 +0000
committerbors <bors@rust-lang.org>2015-03-25 14:14:04 +0000
commita923278c6278c63468d74772c58dbf788e88f58c (patch)
tree52ebffa2c227d1ff4ad12aa0d9cf04a759fadff9 /src/libstd/sys/unix/os.rs
parent928e2e23945493a18bfc658a0adf2c06cb764e83 (diff)
parente962a1d51e28579debb7ce0aa7e9ebaa95947218 (diff)
downloadrust-a923278c6278c63468d74772c58dbf788e88f58c.tar.gz
rust-a923278c6278c63468d74772c58dbf788e88f58c.zip
Auto merge of #23697 - Manishearth:rollup, r=Manishearth
- Successful merges: #23617, #23664, #23680, #23684, #23692, #23693
- Failed merges: 
Diffstat (limited to 'src/libstd/sys/unix/os.rs')
-rw-r--r--src/libstd/sys/unix/os.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 6c191689255..c73d30d543a 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -206,7 +206,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
         if err != 0 { return Err(io::Error::last_os_error()); }
         if sz == 0 { return Err(io::Error::last_os_error()); }
         v.set_len(sz as uint - 1); // chop off trailing NUL
-        Ok(PathBuf::new::<OsString>(OsStringExt::from_vec(v)))
+        Ok(PathBuf::from(OsString::from_vec(v)))
     }
 }
 
@@ -232,7 +232,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
             Err(io::Error::last_os_error())
         } else {
             let vec = CStr::from_ptr(v).to_bytes().to_vec();
-            Ok(PathBuf::new::<OsString>(OsStringExt::from_vec(vec)))
+            Ok(PathBuf::from(OsString::from_vec(vec)))
         }
     }
 }
@@ -345,7 +345,7 @@ pub fn args() -> Args {
             let utf_c_str: *const libc::c_char =
                 mem::transmute(objc_msgSend(tmp, utf8_sel));
             let bytes = CStr::from_ptr(utf_c_str).to_bytes();
-            res.push(OsString::from_str(str::from_utf8(bytes).unwrap()))
+            res.push(OsString::from(str::from_utf8(bytes).unwrap()))
         }
     }