File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 4edf3758d178213882530c47b9ea1e2e6356d5a1
9
+ refs/heads/dist-snap: 943f9aaa4a0302cee1b28c2fec3f23fc1c43fd61
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -445,9 +445,8 @@ prefer using raw pointers (`*`) if that's needed because the compiler can't make
445
445
about them.
446
446
447
447
Vectors and strings share the same basic memory layout, and utilities are available in the ` vec ` and
448
- ` str ` modules for working with C APIs. Strings are terminated with ` \0 ` for interoperability with C,
449
- but it should not be assumed because a slice will not always be nul-terminated. Instead, the
450
- ` str::as_c_str ` function should be used.
448
+ ` str ` modules for working with C APIs. However, strings are not terminated with ` \0 ` . If you need a
449
+ NUL-terminated string for interoperability with C, you should use the ` c_str::to_c_str ` function.
451
450
452
451
The standard library includes type aliases and function definitions for the C standard library in
453
452
the ` libc ` module, and Rust links against ` libc ` and ` libm ` by default.
You can’t perform that action at this time.
0 commit comments