Commit 6e22249c authored by Astro's avatar Astro

fmt_buffer: fix str_to_cstr doc

parent 9b830ce7
......@@ -37,7 +37,7 @@ impl<'a> fmt::Write for FmtBuffer<'a> {
}
}
/// 256 bytes ought to be enough for any string
/// 255 bytes ought to be enough for any C string
pub fn str_to_cstr(s: &str) -> [u8; 256] {
let mut buf: [u8; 256] = unsafe { uninitialized() };
let mut fmt = FmtBuffer::new(buf.as_mut());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment