Simplify CString doc comment

No need for `&b"foo"[..]` to make a CString, `"foo"` will do.
This commit is contained in:
Ben Striegel 2015-05-16 22:30:25 -04:00
parent c23a9d42ea
commit e1f73b8e2b

View File

@ -53,8 +53,7 @@ use vec::Vec;
/// fn my_printer(s: *const libc::c_char);
/// }
///
/// let to_print = &b"Hello, world!"[..];
/// let c_to_print = CString::new(to_print).unwrap();
/// let c_to_print = CString::new("Hello, world!").unwrap();
/// unsafe {
/// my_printer(c_to_print.as_ptr());
/// }