Convert Intos to Froms.

This commit is contained in:
Clar Charr 2017-05-20 15:40:53 -04:00 committed by Oliver Middleton
parent 445077963c
commit 5a97036b69
4 changed files with 12 additions and 12 deletions

View file

@ -2009,9 +2009,9 @@ impl From<Box<str>> for String {
}
#[stable(feature = "box_from_str", since = "1.18.0")]
impl Into<Box<str>> for String {
fn into(self) -> Box<str> {
self.into_boxed_str()
impl From<String> for Box<str> {
fn from(s: String) -> Box<str> {
s.into_boxed_str()
}
}

View file

@ -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()
}
}

View file

@ -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()
}
}

View file

@ -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()
}
}