Skip to content

Commit 4175f1c

Browse files
committed
Add std::process
Per [RFC 579](rust-lang/rfcs#579), this commit adds a new `std::process` module. This module is largely based on the existing `std::old_io::process` module, but refactors the API to use `OsStr` and other new standards set out by IO reform. The existing module is not yet deprecated, to allow for the new API to get a bit of testing before a mass migration to it.
1 parent 39b463f commit 4175f1c

File tree

16 files changed

+2051
-36
lines changed

16 files changed

+2051
-36
lines changed

src/libstd/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ pub mod os;
258258
pub mod env;
259259
pub mod path;
260260
pub mod old_path;
261+
pub mod process;
261262
pub mod rand;
262263
pub mod time;
263264

src/libstd/path.rs

+5
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,11 @@ impl PathBuf {
942942

943943
true
944944
}
945+
946+
/// Consume the `PathBuf`, yielding its internal `OsString` storage
947+
pub fn into_os_string(self) -> OsString {
948+
self.inner
949+
}
945950
}
946951

947952
impl<'a, P: ?Sized + 'a> iter::FromIterator<&'a P> for PathBuf where P: AsPath {

0 commit comments

Comments
 (0)