-
Notifications
You must be signed in to change notification settings - Fork 304
Switch error handling setup to quick_main! macro from error-chain #59
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
Comments
|
I can do that |
Using following form will hide part of doctest boilerplate from rendering but still allow for the code to compile and run under skeptic. ``` # fn main() { # run().unwrap(); # } ``` It might make the existing snippets more ergonomic without the need to pull error-chain as dependency (or even hide error-chain noise if required) cc @brson |
Given that we don't have playground links (see #32), there needs to be a way to copy and run these examples. I would prefer not to hide main so that you can copy into a main.rs and expect it to work. |
Yes, I want to not hide code in the cookbook, have the examples say everything they are doing. |
Right now the error handling pattern suggested by the cookbook's 'about' page, and used in at least some of the examples, looks similar to
quick_main!
. Seems like we should just use that.Switch the existing examples to replace 'main' with 'quick_main!', and update the about page.
cc @dtolnay @Yamakaky
The text was updated successfully, but these errors were encountered: