Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Astro
rust-card10
Commits
6e22249c
Commit
6e22249c
authored
Aug 28, 2019
by
Astro
⚙
Browse files
fmt_buffer: fix str_to_cstr doc
parent
9b830ce7
Pipeline
#3642
passed with stage
in 11 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
l0dable/src/fmt_buffer.rs
View file @
6e22249c
...
...
@@ -37,7 +37,7 @@ impl<'a> fmt::Write for FmtBuffer<'a> {
}
}
/// 25
6
bytes ought to be enough for any string
/// 25
5
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
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment