Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rust-card10
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lilpep
rust-card10
Commits
6e22249c
Commit
6e22249c
authored
5 years ago
by
Astro
Browse files
Options
Downloads
Patches
Plain Diff
fmt_buffer: fix str_to_cstr doc
parent
9b830ce7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
l0dable/src/fmt_buffer.rs
+1
-1
1 addition, 1 deletion
l0dable/src/fmt_buffer.rs
with
1 addition
and
1 deletion
l0dable/src/fmt_buffer.rs
+
1
−
1
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
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment