diff options
Diffstat (limited to 'src/libstd/ffi')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 8 | ||||
| -rw-r--r-- | src/libstd/ffi/os_str.rs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 1a91417ca0e..5f0b11a616e 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -585,11 +585,11 @@ impl From<Box<CStr>> for CString { } } -#[stable(feature = "box_from_c_string", since = "1.18.0")] -impl Into<Box<CStr>> for CString { +#[stable(feature = "box_from_c_string", since = "1.20.0")] +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 42d641706a8..02a13ed7a5a 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -540,10 +540,10 @@ 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() +#[stable(feature = "box_from_os_string", since = "1.20.0")] +impl From<OsString> for Box<OsStr> { + fn from(s: OsString) -> Box<OsStr> { + s.into_boxed_os_str() } } |
