Rollup merge of #133126 - ohno418:fix-String-doc, r=jhpratt

alloc: fix `String`'s doc

Just a minor fix for `String` struct.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-11-17 23:56:11 +08:00 committed by GitHub
commit defc8666a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,7 @@ use crate::vec::Vec;
/// `String`s are always valid UTF-8. If you need a non-UTF-8 string, consider
/// [`OsString`]. It is similar, but without the UTF-8 constraint. Because UTF-8
/// is a variable width encoding, `String`s are typically smaller than an array of
/// the same `chars`:
/// the same `char`s:
///
/// ```
/// use std::mem;