Implement From<&mut str> for String

This commit is contained in:
Ryan Lopopolo 2020-03-02 21:17:58 -08:00
parent 97b3d81615
commit 2a29726fcd

View File

@ -2225,6 +2225,14 @@ impl From<&str> for String {
} }
} }
#[stable(feature = "???", since = "1.43.0")]
impl From<&mut str> for String {
#[inline]
fn from(s: &mut str) -> String {
s.to_owned()
}
}
#[stable(feature = "from_ref_string", since = "1.35.0")] #[stable(feature = "from_ref_string", since = "1.35.0")]
impl From<&String> for String { impl From<&String> for String {
#[inline] #[inline]