From abec9e3783df73dd834abb84aa04ebed28d68720 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Fri, 11 Apr 2025 06:43:28 +0800 Subject: [PATCH] Update src/c_string.rs Co-authored-by: Markus Reiter --- src/c_string.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/c_string.rs b/src/c_string.rs index 8483ee47..b61529ed 100644 --- a/src/c_string.rs +++ b/src/c_string.rs @@ -118,6 +118,7 @@ impl CString { } /// 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());