-
Notifications
You must be signed in to change notification settings - Fork 43
Cleanup src/solver.rs #127
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
Conversation
Eh2406
left a comment
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.
Thanks for the improvements!
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.
Thanks for the PR! At first read I like most of it though I have a few remarks. We tend to be as specific as possible and favor reader over writer, so I'm not a super fan of unqualified import (for the log module).
Another nitpick, I'd prefer avoiding shadowing of variable (dependencies).
- Reduces nesting, to increase legibility of code - Turns expect into error - Removes unwrap()
Happy to help, awesome crate :) We use this in production btw!
I definitely agree with you! I tend to always explicitly include anything I use, with only two exceptions:
That is one feature of Rust I love :D but I get you, so I changed it, I hope my naming makes sense (I'm not too familiar with the codebase). Feel free to also just take some part of my PR and throw out other parts! Style is always very subjective, I don't want to enforce my ideas, just sharing something that might be useful. Cheers! |
|
@mpizenberg are we good to merge now? |
|
If it's good for you, let me final check Sunday and I'll merge. If you
don't here from me on Monday, consider it's good to merge :)
…On Fri, Jun 9, 2023, 18:57 Jacob Finkelman ***@***.***> wrote:
@mpizenberg <https://github.com/mpizenberg> are we good to merge now?
—
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWFOCKEYUGZOBJ6ISYM7J3XKNIYHANCNFSM6AAAAAAXWEQZYI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Feels good to get rid of another |
- Reduces nesting, to increase legibility of code - Turns expect into error - Removes unwrap()
This PR does some little refactoring of the
resolvemethod.unwrap()by using a match statement.