-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: remove anyerror and apply clippy fixes #23
Conversation
First, this removes the anyerror dependency and instead uses thiserror to expose parsing errors. Secondly, this makes many getx() and setx() functions return an Option<T> instead of a Result<T, FooErr>. The main reason for this change is that it follows the std's convention (e.g. Vec<T>::get). Finally, this patch removes all Result<T> return types that do not ever return an error.
This looks like a really helpful change! I think that using results for tree edit operations is still necessary however, as I would like an error to be thrown if the edit operation is infeasible. |
Which edit operations should be able to return an |
Right, never mind! I meant to add errors to the SPR, NNI, and TBR traits, but I haven't gotten to it yet; I will add those soon. I would say leave those traits unchanged for the time being (SPR, NNI, and TBR); the other changes in this pull request look fine to me. I will send a "request change" to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave SPR, NNI, and TBR return types unchanged. the others look fine to me
Created by running ``` cargo clippy --all-targets --all-features --fix ```
First, this removes the anyerror dependency and instead uses thiserror to expose parsing errors. Secondly, this makes many getx() and setx() functions return an Option instead of a Result<T, FooErr>. The main reason for this change is that it follows the std's convention (e.g. Vec::get). Finally, this patch removes all Result return types that do not ever return an error.