Skip to content

Commit

Permalink
Rollup merge of #60536 - brainplot:fix-unicode-character, r=dtolnay
Browse files Browse the repository at this point in the history
Correct code points to match their textual description

Probably due to a copy-paste error, in the sentence

> For example, despite looking similar, the 'é' character is one Unicode code point while 'é' is two Unicode code points:

the two `é`'s were actually the same character in the text (i.e. the same Unicode character U+00E9).
The code listing below instead had two different Unicode characters for the two `é`s, as it was supposed to.
The example shown wasn't clear at first so I started inspecting the text and found this out.
I simply copied the character from the code listing to the description surrounding the code.
It's a minor thing but I thought it would make things clearer for others, especially since the example is about how Rust handles `char`s.
  • Loading branch information
Manishearth authored May 5, 2019
2 parents 2c7712b + 99b9806 commit ff7ef11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ mod prim_never { }
///
/// As always, remember that a human intuition for 'character' may not map to
/// Unicode's definitions. For example, despite looking similar, the 'é'
/// character is one Unicode code point while 'é' is two Unicode code points:
/// character is one Unicode code point while '' is two Unicode code points:
///
/// ```
/// let mut chars = "é".chars();
Expand Down

0 comments on commit ff7ef11

Please sign in to comment.