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 c23a9d4 commit e1f73b8Copy full SHA for e1f73b8
src/libstd/ffi/c_str.rs
@@ -53,8 +53,7 @@ use vec::Vec;
53
/// fn my_printer(s: *const libc::c_char);
54
/// }
55
///
56
-/// let to_print = &b"Hello, world!"[..];
57
-/// let c_to_print = CString::new(to_print).unwrap();
+/// let c_to_print = CString::new("Hello, world!").unwrap();
58
/// unsafe {
59
/// my_printer(c_to_print.as_ptr());
60
0 commit comments