-
Notifications
You must be signed in to change notification settings - Fork 29
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
TOB-DQK-007 remove panics #95
Conversation
Great work! I think we can improve it further by using |
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
The build is going to fail because files are not importing |
Co-authored-by: Roman Kashitsyn <[email protected]>
Co-authored-by: Roman Kashitsyn <[email protected]>
@roman-kashitsyn I've changed most of the code to use context instead of map_err when it makes sense. map_err is now used only to wrap an error not supported by anyhow inside an anyhow error. Please have a look again. |
I removed the (panic|unwrap|expect)s from the project on bad user inputs and similar errors that are expected to happen and should be reported with a human friendly message. Some of my changes are redundant, e.g. the unwrap on opts that get also validated by validators, but the new code is not much more than unwrapping.
I also added some tests in main.rs that helped me validating my changes to that file.