Skip to content
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

Merged
merged 1 commit into from
May 20, 2015
Merged

Add example for from_str_radix #25583

merged 1 commit into from
May 20, 2015

Conversation

steveklabnik
Copy link
Member

Fixes #25517

@rust-highfive
Copy link
Collaborator

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));
Copy link
Member

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.

Copy link
Member Author

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

@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton rollup

@bors
Copy link
Contributor

bors commented May 18, 2015

📌 Commit 1254c34 has been approved by alexcrichton

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 18, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 19, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 20, 2015
@steveklabnik
Copy link
Member Author

steveklabnik@395d01c

bors added a commit that referenced this pull request May 20, 2015
@bors bors merged commit 1254c34 into rust-lang:master May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API docs misleading about path to from_str_radix method
5 participants