Merge pull request #189 from clarfonthey/as_mut_str

Add ArrayString::as_mut_str
This commit is contained in:
bluss
2021-06-20 23:41:01 +02:00
committed by GitHub
+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
}