Skip to content

Commit

Permalink
unbreak bitrig/openbsd build after 8389253
Browse files Browse the repository at this point in the history
`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
  • Loading branch information
semarie committed Mar 25, 2015
1 parent 593db00 commit eefb8e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/os.rs
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

0 comments on commit eefb8e2

Please sign in to comment.