Implement AsMut<str> for str

This commit is contained in:
Yaulendil 2020-12-21 18:42:29 -05:00
parent 11c94a1977
commit 05af4213b5
No known key found for this signature in database
GPG key ID: A2AA91D98F804B70

View file

@ -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
////////////////////////////////////////////////////////////////////////////////