Skip to content

Commit ff7ef11

Browse files
authored
Rollup merge of #60536 - brainplot:fix-unicode-character, r=dtolnay
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.
2 parents 2c7712b + 99b9806 commit ff7ef11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/primitive_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ mod prim_never { }
279279
///
280280
/// As always, remember that a human intuition for 'character' may not map to
281281
/// Unicode's definitions. For example, despite looking similar, the 'é'
282-
/// character is one Unicode code point while 'é' is two Unicode code points:
282+
/// character is one Unicode code point while '' is two Unicode code points:
283283
///
284284
/// ```
285285
/// let mut chars = "é".chars();

0 commit comments

Comments
 (0)