Rollup merge of #143608 - codexarafat:fix-string-doc, r=Noratrieb

Fix in std::String docs

This PR removes the word “else” from the sentence ('something else similar') in the String documentation to improve clarity.
Fixes rust-lang/rust#143579.
This commit is contained in:
Matthias Krüger 2025-07-08 03:09:59 +02:00 committed by GitHub
commit fd05071727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -156,7 +156,7 @@ use crate::vec::{self, Vec};
/// ```
///
/// Next, what should `s[i]` return? Because indexing returns a reference
/// to underlying data it could be `&u8`, `&[u8]`, or something else similar.
/// to underlying data it could be `&u8`, `&[u8]`, or something similar.
/// Since we're only providing one index, `&u8` makes the most sense but that
/// might not be what the user expects and can be explicitly achieved with
/// [`as_bytes()`]: