Skip to content

Commit 83d4b43

Browse files
authored
Rollup merge of #42905 - casey:casey-utf8-null-doc, r=steveklabnik
Reword OsStr docs to clarify that utf8 may contain nulls The use of the word "but" in the OsStr docs implies (at least to me) that valid UTF-8 does not contain null bytes. Using "which" instead makes it clear that valid UTF-8 may contain null bytes.
2 parents 7808fdd + 0d985c9 commit 83d4b43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/ffi/os_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use sys_common::{AsInner, IntoInner, FromInner};
2929
/// * On Windows, strings are often arbitrary sequences of non-zero 16-bit
3030
/// values, interpreted as UTF-16 when it is valid to do so.
3131
///
32-
/// * In Rust, strings are always valid UTF-8, but may contain zeros.
32+
/// * In Rust, strings are always valid UTF-8, which may contain zeros.
3333
///
3434
/// `OsString` and [`OsStr`] bridge this gap by simultaneously representing Rust
3535
/// and platform-native string values, and in particular allowing a Rust string

0 commit comments

Comments
 (0)