File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ use ptr;
23
23
use slice;
24
24
use str:: { self , Utf8Error } ;
25
25
26
- /// A type representing an owned, C-compatible, UTF-8 string.
26
+ /// A type representing an owned, C-compatible, nul-terminated string with no nul bytes in the
27
+ /// middle.
27
28
///
28
29
/// This type serves the purpose of being able to safely generate a
29
- /// C-compatible UTF-8 string from a Rust byte slice or vector. An instance of this
30
+ /// C-compatible string from a Rust byte slice or vector. An instance of this
30
31
/// type is a static guarantee that the underlying bytes contain no interior 0
31
32
/// bytes ("nul characters") and that the final byte is 0 ("nul terminator").
32
33
///
@@ -443,7 +444,7 @@ impl CString {
443
444
Box :: into_raw ( self . into_inner ( ) ) as * mut c_char
444
445
}
445
446
446
- /// Converts the `CString` into a [`String`] if it contains valid Unicode data.
447
+ /// Converts the `CString` into a [`String`] if it contains valid UTF-8 data.
447
448
///
448
449
/// On failure, ownership of the original `CString` is returned.
449
450
///
You can’t perform that action at this time.
0 commit comments