diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-25 17:12:14 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-25 19:44:08 +0530 |
| commit | 2354fc9fac56866878ce86f02635a4950e1ac984 (patch) | |
| tree | 567f5b35abcd2afeb1357ef9f12eb2a883614ddb | |
| parent | 4283b2ab5053eec3c7f95682e82aee9006c58eef (diff) | |
| parent | eefb8e206504e01054fdd4843c31270a3945e49c (diff) | |
| download | rust-2354fc9fac56866878ce86f02635a4950e1ac984.tar.gz rust-2354fc9fac56866878ce86f02635a4950e1ac984.zip | |
Rollup merge of #23693 - semarie:openbsd-pathbuf-new, r=nikomatsakis
`PathBuf::new` have been changed. Use `PathBuf::from` instead. Apply the same change for freebsd too, while here.
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 5699a60908b..c73d30d543a 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<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))) } } @@ -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))) } } } |
