Skip to content

unbreak bitrig/openbsd build after 8389253d #23693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
}

Expand All @@ -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)))
}
}
}
Expand Down