From 47551b1513f24ec695a6fc05326044d74a64e156 Mon Sep 17 00:00:00 2001 From: lcolaholicl Date: Sun, 30 Jun 2019 02:02:03 +0900 Subject: [PATCH 1/2] Fix a typo Fix a typo in `libcore/char/methods.rs` --- src/libcore/char/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/char/methods.rs b/src/libcore/char/methods.rs index 722c4c80516..b1f43ef99dd 100644 --- a/src/libcore/char/methods.rs +++ b/src/libcore/char/methods.rs @@ -337,7 +337,7 @@ impl char { /// ``` /// // as chars /// let eastern = '東'; - /// let capitol = '京'; + /// let capital = '京'; /// /// // both can be represented as three bytes /// assert_eq!(3, eastern.len_utf8()); From 1fd64cf9b5772020b0af034318236aa3db54553e Mon Sep 17 00:00:00 2001 From: lcolaholicl Date: Sun, 30 Jun 2019 02:46:45 +0900 Subject: [PATCH 2/2] fix the same typo in doctest --- src/libcore/char/methods.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/char/methods.rs b/src/libcore/char/methods.rs index b1f43ef99dd..e843303380a 100644 --- a/src/libcore/char/methods.rs +++ b/src/libcore/char/methods.rs @@ -341,12 +341,12 @@ impl char { /// /// // 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());