From 653ceee3b3a777ea452e718835e0b27cf369906c Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Thu, 26 Feb 2015 06:16:41 +0100 Subject: path -> PathBuf for openbsd/bitrig --- src/libstd/sys/unix/os.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 899280aa709..a38c7a30b75 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -229,7 +229,8 @@ pub fn current_exe() -> io::Result { if v.is_null() { Err(io::Error::last_os_error()) } else { - Ok(Path::new(CStr::from_ptr(v).to_bytes().to_vec())) + let vec = CStr::from_ptr(v).to_bytes().to_vec(); + Ok(PathBuf::new::(&OsStringExt::from_vec(vec))) } } } -- cgit 1.4.1-3-g733a5