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

FromStr implementation example #40824

Merged
merged 3 commits into from
Mar 29, 2017
Merged

Conversation

donniebishop
Copy link
Contributor

Referencing #29375. Added example implementation of FromStr trait to API Documentation

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik steveklabnik self-assigned this Mar 25, 2017
Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a tiny change. Thanks so much!

/// .split(",")
/// .collect();
///
/// let x_fromstr = try!(coords[0].parse::<i32>());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? should be used instead of try!.

/// .collect();
///
/// let x_fromstr = try!(coords[0].parse::<i32>());
/// let y_fromstr = try!(coords[1].parse::<i32>());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@donniebishop
Copy link
Contributor Author

Funny enough, this is how I originally mocked it up, but opted for the more verbose option on the side of caution haha

Will make a quick change and recommit

Thanks for the feedback!

@steveklabnik
Copy link
Member

@bors: r+ rollup

ha! awesome, thanks a ton!

@bors
Copy link
Contributor

bors commented Mar 25, 2017

📌 Commit fb5e63f has been approved by steveklabnik

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 26, 2017
…steveklabnik

FromStr implementation example

Referencing rust-lang#29375. Added example implementation of FromStr trait to API Documentation
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 27, 2017
…steveklabnik

FromStr implementation example

Referencing rust-lang#29375. Added example implementation of FromStr trait to API Documentation
bors added a commit that referenced this pull request Mar 27, 2017
bors added a commit that referenced this pull request Mar 28, 2017
@bors bors merged commit fb5e63f into rust-lang:master Mar 29, 2017
@donniebishop donniebishop deleted the fromstr_docexample branch March 29, 2017 16:44
@donniebishop donniebishop mentioned this pull request Apr 1, 2017
11 tasks
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.

5 participants