From 4eed87c2832586a804e9ef4f768fc66a19ccc655 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Sat, 20 May 2017 15:40:53 -0400 Subject: [PATCH] Convert Intos to Froms. --- src/libcollections/string.rs | 6 +++--- src/libcollections/vec.rs | 6 +++--- src/libstd/ffi/c_str.rs | 6 +++--- src/libstd/ffi/os_str.rs | 6 +++--- src/libstd/path.rs | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 55f0e01548fee..670a883ecf133 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -2088,9 +2088,9 @@ impl From> for String { } #[stable(feature = "box_from_str", since = "1.18.0")] -impl Into> for String { - fn into(self) -> Box { - self.into_boxed_str() +impl From for Box { + fn from(s: String) -> Box { + s.into_boxed_str() } } diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 3ef8438bc0bd2..cf9aa975fc0bc 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -2125,9 +2125,9 @@ impl From> for Vec { } #[stable(feature = "box_from_vec", since = "1.18.0")] -impl Into> for Vec { - fn into(self) -> Box<[T]> { - self.into_boxed_slice() +impl From> for Box<[T]> { + fn from(v: Vec) -> Box<[T]> { + v.into_boxed_slice() } } diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index f40475a41422b..139fa671cacf8 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -427,9 +427,9 @@ impl From> for CString { } #[stable(feature = "box_from_c_string", since = "1.18.0")] -impl Into> for CString { - fn into(self) -> Box { - self.into_boxed_c_str() +impl From for Box { + fn from(s: CString) -> Box { + s.into_boxed_c_str() } } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index eaf0502a577d9..1968a6ffe03ea 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -537,9 +537,9 @@ impl<'a> From> for OsString { } #[stable(feature = "box_from_os_string", since = "1.18.0")] -impl Into> for OsString { - fn into(self) -> Box { - self.into_boxed_os_str() +impl From for Box { + fn from(s: OsString) -> Box { + s.into_boxed_os_str() } } diff --git a/src/libstd/path.rs b/src/libstd/path.rs index e7d8c3007f692..101466304eaa6 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1349,9 +1349,9 @@ impl<'a> From> for PathBuf { } #[stable(feature = "box_from_path_buf", since = "1.18.0")] -impl Into> for PathBuf { - fn into(self) -> Box { - self.into_boxed_path() +impl From for Box { + fn from(p: PathBuf) -> Box { + p.into_boxed_path() } }