about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSébastien Marie <semarie@users.noreply.github.com>2015-03-25 08:42:15 +0100
committerSébastien Marie <semarie@users.noreply.github.com>2015-03-25 08:44:35 +0100
commiteefb8e206504e01054fdd4843c31270a3945e49c (patch)
tree971b8acf5ef2b69f317f135365138a8c5b138500 /src/libstd
parent593db005d4dbce2ff72009c1ba03477b031b2c0f (diff)
downloadrust-eefb8e206504e01054fdd4843c31270a3945e49c.tar.gz
rust-eefb8e206504e01054fdd4843c31270a3945e49c.zip
unbreak bitrig/openbsd build after 8389253d
`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/unix/os.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 6c191689255..7cd27ed3afc 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)))
         }
     }
 }