Make as_ptr and as_mut_ptr on ArrayString public

This commit is contained in:
YuhanLiin
2024-01-25 23:50:20 -05:00
committed by bluss
parent 1cd7b9d859
commit 9f45cc26c3
+4 -2
View File
@@ -415,11 +415,13 @@ impl<const CAP: usize> ArrayString<CAP>
self
}
fn as_ptr(&self) -> *const u8 {
/// Return a raw pointer to the string's buffer.
pub fn as_ptr(&self) -> *const u8 {
self.xs.as_ptr() as *const u8
}
fn as_mut_ptr(&mut self) -> *mut u8 {
/// Return a raw mutable pointer to the string's buffer.
pub fn as_mut_ptr(&mut self) -> *mut u8 {
self.xs.as_mut_ptr() as *mut u8
}
}