-
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 example for from_str_radix #25583
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
/// `Err(ParseIntError)` if the string did not represent a valid number. | ||
/// Otherwise, `Ok(n)` where `n` is the integer represented by `src`. | ||
/// ``` | ||
/// assert_eq!(Some(10), u32::from_str_radix("A", 16)); |
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.
I think that the ordering is generally assert_eq!(actual, expected)
, so perhaps this could be swapped? Other than that though r=me.
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.
i always get this wrong
@bors: r=alexcrichton rollup |
📌 Commit 1254c34 has been approved by |
Fixes #25517