Rollup merge of #115454 - vwkd:patch-1, r=scottmcm

Clarify example in docs of str::char_slice

Just a one word improvement.

“Last” can be misread as meaning the last (third) instead of the previous (first).
This commit is contained in:
Guillaume Gomez 2023-10-06 13:18:33 +02:00 committed by GitHub
commit 4e818f6b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -808,7 +808,7 @@ impl str {
/// assert_eq!(Some((0, 'y')), char_indices.next()); // not (0, 'y̆')
/// assert_eq!(Some((1, '\u{0306}')), char_indices.next());
///
/// // note the 3 here - the last character took up two bytes
/// // note the 3 here - the previous character took up two bytes
/// assert_eq!(Some((3, 'e')), char_indices.next());
/// assert_eq!(Some((4, 's')), char_indices.next());
///