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

Unclear paragraph in The Book #31927

Closed
xrisk opened this issue Feb 26, 2016 · 4 comments
Closed

Unclear paragraph in The Book #31927

xrisk opened this issue Feb 26, 2016 · 4 comments

Comments

@xrisk
Copy link

xrisk commented Feb 26, 2016

This is how you generally move from ‘crash on error’ to ‘actually handle the returned by parse() is an enum just like Ordering, but in this case, each variant has some data associated with it: Ok is a success, and Err is a failure.

From https://doc.rust-lang.org/book/guessing-game.html#looping (emphasis mine).

@steveklabnik
Copy link
Member

Agreed, this is a bit unclear. I would say maybe

The way you move from "crash on error" to "handle the error" is an enum...

Thoughts?

@flukejones
Copy link
Contributor

I saw someone already had a go at clarification. Good work! I Added some further refinements which should help enhance it a bit more.

bors added a commit that referenced this issue Feb 27, 2016
 Refinement of paragraph referenced by [this issue](#31927).

The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.
@steveklabnik
Copy link
Member

This was fixed!

@xrisk
Copy link
Author

xrisk commented Mar 9, 2016

👍 😄

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

No branches or pull requests

3 participants