-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove a gotcha from book/error-handling.md #34129
Conversation
The book's "Error handling with Box<Error>" section talks about Box<Error>. In the actual example Box<Error + Send + Sync> is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from &str/String to Box<Error>, so this gotcha and later references to it can now be removed.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (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. |
Great, thank you! @bors: r+ rollup |
📌 Commit 75fc40c has been approved by |
…veklabnik Remove a gotcha from book/error-handling.md The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to `Box<Error>`, so this gotcha and later references to it can now be removed. r? @steveklabnik
…veklabnik Remove a gotcha from book/error-handling.md The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to `Box<Error>`, so this gotcha and later references to it can now be removed. r? @steveklabnik
…veklabnik Remove a gotcha from book/error-handling.md The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to `Box<Error>`, so this gotcha and later references to it can now be removed. r? @steveklabnik
The book's "Error handling with
Box<Error>
" section talks aboutBox<Error>
. In the actual exampleBox<Error + Send + Sync>
is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from&str
/String
toBox<Error>
, so this gotcha and later references to it can now be removed.r? @steveklabnik