-
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
Remove clippy warnings #109
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #109 +/- ##
==========================================
+ Coverage 61.97% 63.74% +1.76%
==========================================
Files 38 36 -2
Lines 6478 5786 -692
==========================================
- Hits 4015 3688 -327
+ Misses 2463 2098 -365 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
I also tested changes locally and it passes tests.
let region = self.universe.borrow(py).convert_id_to_region(id); | ||
match region { | ||
Some(r) => Some(r.into()), | ||
None => None, | ||
} | ||
region |
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.
Ok, for items like this, are we certain region will be None
without the match statement?
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.
So I think that the reason Clippy sked for this is that the match is redundant... if it matches Some,
we immediately turn into Some
again... If it matches None
we immediately return None
. I think that's why it had me change this.
Thanks for doing this. |
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.
Everything looks good!!
This is a fix for #105 .
I use
clippy
to improve my rust code, catch small things, etc. The current code base had >180 warnings that made it difficult for me to see true errors through the sea of warnings...I want in and remove them by either 1) implementing the fix, or 2) manually suppressing the warning. Overwhelmingly, the warnings were small things like:
or
There were some more elusive warnings about us passing references that get auto-dereferenced by the compiler.
All tests still pass.