mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-27 12:30:35 +00:00
Update src/c_string.rs
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
parent
503262218f
commit
abec9e3783
@ -118,6 +118,7 @@ impl<const N: usize> CString<N> {
|
||||
}
|
||||
|
||||
/// Converts the [`CString`] to a [`CStr`] slice.
|
||||
#[inline]
|
||||
pub fn as_c_str(&self) -> &CStr {
|
||||
debug_assert!(CStr::from_bytes_with_nul(&self.inner).is_ok());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user