From 202026441be428046b164e1537ed79972041f5aa Mon Sep 17 00:00:00 2001 From: Xiretza Date: Fri, 27 May 2022 12:12:15 +0200 Subject: [PATCH] docs: Don't imply that OsStr on Unix is always UTF-8 The methods in `OsStrExt` consume and return `&[u8]` and don't perform any UTF-8 checks. --- library/std/src/ffi/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 10983a3323265..94ae97a2e402a 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -104,7 +104,7 @@ //! On Unix, [`OsStr`] implements the //! std::os::unix::ffi::[OsStrExt][unix.OsStrExt] trait, which //! augments it with two methods, [`from_bytes`] and [`as_bytes`]. -//! These do inexpensive conversions from and to UTF-8 byte slices. +//! These do inexpensive conversions from and to byte slices. //! //! Additionally, on Unix [`OsString`] implements the //! std::os::unix::ffi::[OsStringExt][unix.OsStringExt] trait,