alloc: fix String's doc

This commit is contained in:
Yutaro Ohno 2024-11-17 15:12:53 +09:00
parent f2a35426b6
commit ec65dfc45e

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;