diff options
| author | Clar Charr <clar@charr.xyz> | 2017-05-20 15:40:53 -0400 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2017-06-21 01:18:18 +0100 |
| commit | 5a97036b6900ee208f90c52ceadcce606d497e93 (patch) | |
| tree | 760fc0fbd4c98630838b55ec97dfdc27572f9bb1 /src/libstd | |
| parent | 445077963c55297ef1e196a3525723090fe80b22 (diff) | |
| download | rust-5a97036b6900ee208f90c52ceadcce606d497e93.tar.gz rust-5a97036b6900ee208f90c52ceadcce606d497e93.zip | |
Convert Intos to Froms.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 6 | ||||
| -rw-r--r-- | src/libstd/ffi/os_str.rs | 6 | ||||
| -rw-r--r-- | src/libstd/path.rs | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 1a91417ca0e..1586e0a4ddb 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -586,10 +586,10 @@ impl From<Box<CStr>> for CString { } #[stable(feature = "box_from_c_string", since = "1.18.0")] -impl Into<Box<CStr>> for CString { +impl From<CString> for Box<CStr> { #[inline] - fn into(self) -> Box<CStr> { - self.into_boxed_c_str() + fn from(s: CString) -> Box<CStr> { + s.into_boxed_c_str() } } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index f54d79c201f..3815f986681 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -543,9 +543,9 @@ impl From<Box<OsStr>> for OsString { } #[stable(feature = "box_from_os_string", since = "1.18.0")] -impl Into<Box<OsStr>> for OsString { - fn into(self) -> Box<OsStr> { - self.into_boxed_os_str() +impl From<OsString> for Box<OsStr> { + fn from(s: OsString) -> Box<OsStr> { + s.into_boxed_os_str() } } diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 42a54ed6d75..e9bf7b33b8e 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1349,9 +1349,9 @@ impl From<Box<Path>> for PathBuf { } #[stable(feature = "box_from_path_buf", since = "1.18.0")] -impl Into<Box<Path>> for PathBuf { - fn into(self) -> Box<Path> { - self.into_boxed_path() +impl From<PathBuf> for Box<Path> { + fn from(p: PathBuf) -> Box<Path> { + p.into_boxed_path() } } |
