about summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/path.rs')
-rwxr-xr-xsrc/libstd/path.rs5
1 files changed, 5 insertions, 0 deletions
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 {