Skip to content

Commit 05af421

Browse files
committed
Implement AsMut<str> for str
1 parent 11c94a1 commit 05af421

File tree

1 file changed

+8
-0
lines changed
  • library/core/src/convert

1 file changed

+8
-0
lines changed

library/core/src/convert/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,14 @@ impl AsRef<str> for str {
623623
}
624624
}
625625

626+
#[stable(feature = "as_mut_str_for_str", since = "1.50.0")]
627+
impl AsMut<str> for str {
628+
#[inline]
629+
fn as_mut(&mut self) -> &mut str {
630+
self
631+
}
632+
}
633+
626634
////////////////////////////////////////////////////////////////////////////////
627635
// THE NO-ERROR ERROR TYPE
628636
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)