Skip to content

Commit

Permalink
Implement AsMut<str> for str
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaulendil committed Dec 21, 2020
1 parent 11c94a1 commit 05af421
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ impl AsRef<str> for str {
}
}

#[stable(feature = "as_mut_str_for_str", since = "1.50.0")]
impl AsMut<str> for str {
#[inline]
fn as_mut(&mut self) -> &mut str {
self
}
}

////////////////////////////////////////////////////////////////////////////////
// THE NO-ERROR ERROR TYPE
////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 05af421

Please sign in to comment.