Add ArrayString::as_mut_str

This commit is contained in:
ltdk
2021-06-20 15:35:39 -04:00
parent 0c866b32f0
commit c4917813b8
+5
View File
@@ -370,6 +370,11 @@ impl<const CAP: usize> ArrayString<CAP>
self
}
/// Return a mutable string slice of the whole `ArrayString`.
pub fn as_mut_str(&mut self) -> &mut str {
self
}
fn as_ptr(&self) -> *const u8 {
self.xs.as_ptr() as *const u8
}