From 4175f1ce2fa57ca466e94aa59de9b9383f3c05a4 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Fri, 6 Feb 2015 09:42:57 -0800 Subject: Add std::process Per [RFC 579](https://github.com/rust-lang/rfcs/pull/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. --- src/libstd/path.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstd/path.rs') diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 4984b4f9aba..271a4cdb629 100755 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -942,6 +942,11 @@ impl PathBuf { true } + + /// Consume the `PathBuf`, yielding its internal `OsString` storage + pub fn into_os_string(self) -> OsString { + self.inner + } } impl<'a, P: ?Sized + 'a> iter::FromIterator<&'a P> for PathBuf where P: AsPath { -- cgit 1.4.1-3-g733a5