Skip to content

Commit 2a29726

Browse files
committed
Implement From<&mut str> for String
1 parent 97b3d81 commit 2a29726

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/liballoc/string.rs

+8
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,14 @@ impl From<&str> for String {
22252225
}
22262226
}
22272227

2228+
#[stable(feature = "???", since = "1.43.0")]
2229+
impl From<&mut str> for String {
2230+
#[inline]
2231+
fn from(s: &mut str) -> String {
2232+
s.to_owned()
2233+
}
2234+
}
2235+
22282236
#[stable(feature = "from_ref_string", since = "1.35.0")]
22292237
impl From<&String> for String {
22302238
#[inline]

0 commit comments

Comments
 (0)