From ccbff00dba7ec1444ff63c29e7ca576c94bd9190 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Sun, 6 Apr 2025 19:56:49 -0700 Subject: [PATCH] Refactor documentation --- src/c_string.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/c_string.rs b/src/c_string.rs index fcdb52e5..fdfcfe70 100644 --- a/src/c_string.rs +++ b/src/c_string.rs @@ -79,11 +79,11 @@ impl CString { Ok(string) } - /// Instantiate a [`CString`] copying from the giving bytes, assuming it is - /// nul-terminated (ends with a single zero byte). + /// Instantiates a [`CString`] copying from the giving byte slice, assuming it is + /// nul-terminated. /// /// Fails if the given byte slice has any interior nul byte, if the slice does not - /// end in a zero byte or if the byte slice can't fit in `N`. + /// end with a nul byte, or if the byte slice can't fit in `N`. pub fn from_bytes_with_nul(bytes: &[u8]) -> Result { let mut me = Self::new();