about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-30 21:57:29 +0200
committerGitHub <noreply@github.com>2019-06-30 21:57:29 +0200
commit690f9e422ec6e7fdce8dfb7ee1b35cdddede409d (patch)
treea19409352a358799086ada34b3fe3d6a3d458241 /src/libcore
parent2b313b1d321797e7c161c40b102c963cf53dd7ac (diff)
parent1fd64cf9b5772020b0af034318236aa3db54553e (diff)
downloadrust-690f9e422ec6e7fdce8dfb7ee1b35cdddede409d.tar.gz
rust-690f9e422ec6e7fdce8dfb7ee1b35cdddede409d.zip
Rollup merge of #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)
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/char/methods.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/char/methods.rs b/src/libcore/char/methods.rs
index 722c4c80516..e843303380a 100644
--- a/src/libcore/char/methods.rs
+++ b/src/libcore/char/methods.rs
@@ -337,16 +337,16 @@ impl char {
     /// ```
     /// // as chars
     /// let eastern = '東';
-    /// let capitol = '京';
+    /// let capital = '京';
     ///
     /// // both can be represented as three bytes
     /// assert_eq!(3, eastern.len_utf8());
-    /// assert_eq!(3, capitol.len_utf8());
+    /// assert_eq!(3, capital.len_utf8());
     ///
     /// // as a &str, these two are encoded in UTF-8
     /// let tokyo = "東京";
     ///
-    /// let len = eastern.len_utf8() + capitol.len_utf8();
+    /// let len = eastern.len_utf8() + capital.len_utf8();
     ///
     /// // we can see that they take six bytes total...
     /// assert_eq!(6, tokyo.len());