From eefb8e206504e01054fdd4843c31270a3945e49c Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Marie?= Date: Wed, 25 Mar 2015 08:42:15 +0100 Subject: [PATCH] unbreak bitrig/openbsd build after 8389253d `PathBuf::new` have been changed. Use `PathBuf::from` instead. Apply the same change for freebsd too, while here. --- src/libstd/sys/unix/os.rs | 4 ++-- 1 file 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 { 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::(OsStringExt::from_vec(v))) + Ok(PathBuf::from(OsString::from_vec(v))) } } @@ -232,7 +232,7 @@ pub fn current_exe() -> io::Result { Err(io::Error::last_os_error()) } else { let vec = CStr::from_ptr(v).to_bytes().to_vec(); - Ok(PathBuf::new::(OsStringExt::from_vec(vec))) + Ok(PathBuf::from(OsString::from_vec(vec))) } } } -- 2.44.0