Skip to content

Commit 533784d

Browse files
committed
Add docs for From::<&mut str>::from String impl
1 parent 18feaa3 commit 533784d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/liballoc/string.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2227,6 +2227,9 @@ impl From<&str> for String {
22272227

22282228
#[stable(feature = "from_mut_str_for_string", since = "1.44.0")]
22292229
impl From<&mut str> for String {
2230+
/// Converts a `&mut str` into a `String`.
2231+
///
2232+
/// The result is allocated on the heap.
22302233
#[inline]
22312234
fn from(s: &mut str) -> String {
22322235
s.to_owned()

0 commit comments

Comments
 (0)