about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-06-26 23:34:12 -0400
committerGitHub <noreply@github.com>2017-06-26 23:34:12 -0400
commit83d4b43422e6dd72d64e9841e91a77118f1709ef (patch)
treeb4bb42ca98a1647f929ee40c1a2b4fac90a15768 /src/libstd
parent7808fddede85ae587dfb68183e069cd2bc411caa (diff)
parent0d985c9e8760da77b0df8920465700728e2da4f1 (diff)
downloadrust-83d4b43422e6dd72d64e9841e91a77118f1709ef.tar.gz
rust-83d4b43422e6dd72d64e9841e91a77118f1709ef.zip
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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/ffi/os_str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index f54d79c201f..e9296f33b9e 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -29,7 +29,7 @@ use sys_common::{AsInner, IntoInner, FromInner};
 /// * On Windows, strings are often arbitrary sequences of non-zero 16-bit
 ///   values, interpreted as UTF-16 when it is valid to do so.
 ///
-/// * In Rust, strings are always valid UTF-8, but may contain zeros.
+/// * In Rust, strings are always valid UTF-8, which may contain zeros.
 ///
 /// `OsString` and [`OsStr`] bridge this gap by simultaneously representing Rust
 /// and platform-native string values, and in particular allowing a Rust string