Commit 6e22249c authored by Astro's avatar Astro
Browse files

fmt_buffer: fix str_to_cstr doc

parent 9b830ce7
Pipeline #3642 passed with stage
in 11 minutes and 33 seconds
...@@ -37,7 +37,7 @@ impl<'a> fmt::Write for FmtBuffer<'a> { ...@@ -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] { pub fn str_to_cstr(s: &str) -> [u8; 256] {
let mut buf: [u8; 256] = unsafe { uninitialized() }; let mut buf: [u8; 256] = unsafe { uninitialized() };
let mut fmt = FmtBuffer::new(buf.as_mut()); let mut fmt = FmtBuffer::new(buf.as_mut());
......
Supports Markdown
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