-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix almost all remaining warnings from the toolchain update. #1745
Conversation
return Err(e) | ||
.map_err(MonorailError::from) | ||
.map_err(RequestError::from); | ||
return Err(RequestError::from(MonorailError::from(e))); |
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.
how dare you, clippy
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.
Clippy says to meet it behind the school at 3pm and, quote, "let's finish this"
aa7be08
to
d8ab73d
Compare
@@ -834,7 +834,7 @@ fn main() -> ! { | |||
.load_bitstream(AUXFLASH.get_task_id()) | |||
{ | |||
Err(e) => { | |||
let code = u32::try_from(e).unwrap_lite(); |
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.
Everytime an unwrap
gets removed a microcontroller gets its wings
sp_update: SpUpdate, | ||
rot_update: RotUpdate, |
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.
Did those get folded into some default somewhere?
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.
Yes, #1731
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.
Long live clippy
This only covers cases that appeared trivially correct on local inspection.
These are not actually unused, annoyingly.
All _new_ instances of this warning firing are false positives, and are suppressed in this commit.
Clippy would like us to automatically derive default for enums where possible instead of writing our own impl. I happen to agree with Clippy.
This adds Default impls where it seemed appropriate and/or easy to do so, and suppresses the warning in cases where it'd just be dead code generated to appease the clipster.
This adds Default impls where it seemed appropriate and/or easy to do so, and suppresses the warning in cases where it'd just be dead code generated to appease the clipster.
This is the only module that uses static mut and unsafe in a way that is not obviously correct. In the interest of preventing regressions everywhere _else,_ I'm suppressing the relevant warning for this module only.
d8ab73d
to
63aa8cb
Compare
This fixes everything but Hiffy's use of unsafe (or anything anybody has added since I started on this branch).
This change turns Clippy back on to prevent regressions.