Skip to content

Commit

Permalink
Add docs for From::<&mut str>::from String impl
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Mar 11, 2020
1 parent 18feaa3 commit 533784d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,9 @@ impl From<&str> for String {

#[stable(feature = "from_mut_str_for_string", since = "1.44.0")]
impl From<&mut str> for String {
/// Converts a `&mut str` into a `String`.
///
/// The result is allocated on the heap.
#[inline]
fn from(s: &mut str) -> String {
s.to_owned()
Expand Down

0 comments on commit 533784d

Please sign in to comment.