Skip to content

Commit 690f9e4

Browse files
authored
Rollup merge of rust-lang#62239 - lcolaholicl:lcolaholicl-patch-1, r=kennytm
Fix a typo The definition of 京 seems to be capital, but not capitol. [reference](https://en.wiktionary.org/wiki/%E4%BA%AC#Etymology_1) [another reference](https://jisho.org/word/%E4%BA%AC)
2 parents 2b313b1 + 1fd64cf commit 690f9e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/char/methods.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,16 @@ impl char {
337337
/// ```
338338
/// // as chars
339339
/// let eastern = '東';
340-
/// let capitol = '京';
340+
/// let capital = '京';
341341
///
342342
/// // both can be represented as three bytes
343343
/// assert_eq!(3, eastern.len_utf8());
344-
/// assert_eq!(3, capitol.len_utf8());
344+
/// assert_eq!(3, capital.len_utf8());
345345
///
346346
/// // as a &str, these two are encoded in UTF-8
347347
/// let tokyo = "東京";
348348
///
349-
/// let len = eastern.len_utf8() + capitol.len_utf8();
349+
/// let len = eastern.len_utf8() + capital.len_utf8();
350350
///
351351
/// // we can see that they take six bytes total...
352352
/// assert_eq!(6, tokyo.len());

0 commit comments

Comments
 (0)