summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorleonardo.yvens <leoyvens@gmail.com>2016-11-04 15:54:08 -0200
committerleonardo.yvens <leoyvens@gmail.com>2016-11-04 15:54:08 -0200
commit3e4bd8843829284a62af22687ee415a66c8207cc (patch)
tree8d98e3b22f2e5d2a7c85ebacca9caeb43c4c8a65 /src/libstd/path.rs
parent1e5dab1da04143a454a4f3d7e3f835ce990b437a (diff)
downloadrust-3e4bd8843829284a62af22687ee415a66c8207cc.tar.gz
rust-3e4bd8843829284a62af22687ee415a66c8207cc.zip
Change Into<Vec<u8>> for String and Into<OsString> for PathBuf to From impls
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index d6a5dfe5518..e8a7951d557 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1172,6 +1172,13 @@ impl From<OsString> for PathBuf {
     }
 }
 
+#[stable(feature = "from_path_buf_for_os_string", since = "1.14.0")]
+impl From<PathBuf> for OsString {
+    fn from(path_buf : PathBuf) -> OsString {
+        path_buf.inner
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl From<String> for PathBuf {
     fn from(s: String) -> PathBuf {
@@ -1282,13 +1289,6 @@ impl AsRef<OsStr> for PathBuf {
     }
 }
 
-#[stable(feature = "rust1", since = "1.0.0")]
-impl Into<OsString> for PathBuf {
-    fn into(self) -> OsString {
-        self.inner
-    }
-}
-
 /// A slice of a path (akin to [`str`]).
 ///
 /// This type supports a number of operations for inspecting a path, including