Skip to content

Commit

Permalink
Implement From<&mut str> for String
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Mar 3, 2020
1 parent 97b3d81 commit 2a29726
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
impl From<&String> for String {
#[inline]
Expand Down

0 comments on commit 2a29726

Please sign in to comment.