Skip to content

Commit 9f45cc2

Browse files
YuhanLiinbluss
authored andcommitted
Make as_ptr and as_mut_ptr on ArrayString public
1 parent 1cd7b9d commit 9f45cc2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/array_string.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,13 @@ impl<const CAP: usize> ArrayString<CAP>
415415
self
416416
}
417417

418-
fn as_ptr(&self) -> *const u8 {
418+
/// Return a raw pointer to the string's buffer.
419+
pub fn as_ptr(&self) -> *const u8 {
419420
self.xs.as_ptr() as *const u8
420421
}
421422

422-
fn as_mut_ptr(&mut self) -> *mut u8 {
423+
/// Return a raw mutable pointer to the string's buffer.
424+
pub fn as_mut_ptr(&mut self) -> *mut u8 {
423425
self.xs.as_mut_ptr() as *mut u8
424426
}
425427
}

0 commit comments

Comments
 (0)