-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a potential cause raising ParseIntError
.
#48738
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3845,7 +3845,14 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par | |
/// | ||
/// This error is used as the error type for the `from_str_radix()` functions | ||
/// on the primitive integer types, such as [`i8::from_str_radix`]. | ||
/// | ||
/// # Potential causes | ||
/// | ||
/// Among other causes, `ParseIntError` can be thrown because of leading or trailing whitespaces | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whitespace at the end of the line. |
||
/// in the string e.g. when it is getted from the standard input. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whitespace at the end of the line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "getted' doesn't work here. Perhaps "when obtained from the standard input"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, forgive my English. I'll write that down. |
||
/// Using the [`str.trim()`] method ensures that no whitespace remains before parsing. | ||
/// | ||
/// [`str.trim()`]: ../../std/primitive.str.html#method.trim | ||
/// [`i8::from_str_radix`]: ../../std/primitive.i8.html#method.from_str_radix | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[stable(feature = "rust1", since = "1.0.0")] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace at the end of the line.