#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::ffi::CStr; fn main() { let cstr = CStr::from_bytes_with_nul(b"hello\0"); assert_eq!(cstr, Ok(c"hello")); }