We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a355e66 commit d435b54Copy full SHA for d435b54
src/c_string.rs
@@ -68,9 +68,9 @@ impl<const N: usize> CString<N> {
68
/// ```rust
69
/// use heapless::CString;
70
/// let mut c_string =
71
- /// unsafe { CString::<5>::from_bytes_with_nul_unchecked(b"c_string\0").unwrap() };
+ /// unsafe { CString::<7>::from_bytes_with_nul_unchecked(b"string\0").unwrap() };
72
///
73
- /// assert_eq!(c_string.to_str(), Ok("c_string"));
+ /// assert_eq!(c_string.to_str(), Ok("string"));
74
/// ```
75
pub unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> Result<Self, CapacityError> {
76
let mut inner = Vec::new();
0 commit comments