Skip to content

Commit eefb8e2

Browse files
committed
unbreak bitrig/openbsd build after 8389253
`PathBuf::new` have been changed. Use `PathBuf::from` instead. Apply the same change for freebsd too, while here.
1 parent 593db00 commit eefb8e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/sys/unix/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
206206
if err != 0 { return Err(io::Error::last_os_error()); }
207207
if sz == 0 { return Err(io::Error::last_os_error()); }
208208
v.set_len(sz as uint - 1); // chop off trailing NUL
209-
Ok(PathBuf::new::<OsString>(OsStringExt::from_vec(v)))
209+
Ok(PathBuf::from(OsString::from_vec(v)))
210210
}
211211
}
212212

@@ -232,7 +232,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
232232
Err(io::Error::last_os_error())
233233
} else {
234234
let vec = CStr::from_ptr(v).to_bytes().to_vec();
235-
Ok(PathBuf::new::<OsString>(OsStringExt::from_vec(vec)))
235+
Ok(PathBuf::from(OsString::from_vec(vec)))
236236
}
237237
}
238238
}

0 commit comments

Comments
 (0)