From c68440cad49f6d0cda09f8c7d4989ff63f55a26e Mon Sep 17 00:00:00 2001 From: Songbird0 Date: Sun, 4 Mar 2018 21:59:53 +0100 Subject: [PATCH 1/4] Add a potential cause raising `ParseIntError`. Initially, I wanted to add it directly to the documentation of `str. parse()' method, I finally found that it was more relevant (I hope so?) to directly document the structure in question. I've added a scenario, in which we could all get caught at least once, to make it easier to diagnose the problem when parsing integers. --- src/libcore/num/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 59a67fff48cfe..1b51ebefb6041 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -3845,7 +3845,13 @@ fn from_str_radix(src: &str, radix: u32) -> Result Date: Sun, 4 Mar 2018 22:18:42 +0100 Subject: [PATCH 2/4] Tidy error: add a new line The error was: ``` [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3848: trailing whitespace [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: line longer than 100 chars [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: trailing whitespace [00:05:26] some tidy checks failed ``` The line was truncated to 92 characters. --- src/libcore/num/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 1b51ebefb6041..00a46dca87601 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -3848,7 +3848,8 @@ fn from_str_radix(src: &str, radix: u32) -> Result Date: Mon, 5 Mar 2018 03:57:33 +0100 Subject: [PATCH 3/4] Modify wording and remove useless whitespaces. --- src/libcore/num/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 00a46dca87601..8b43aeefade5c 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -3845,11 +3845,11 @@ fn from_str_radix(src: &str, radix: u32) -> Result Date: Mon, 5 Mar 2018 14:33:37 +0100 Subject: [PATCH 4/4] Fix spelling error for `whitespaces`. --- src/libcore/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 8b43aeefade5c..929d6ef4c200f 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -3848,7 +3848,7 @@ fn from_str_radix(src: &str, radix: u32) -> Result