Skip to content
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

Merged
merged 17 commits into from
Apr 11, 2024

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Apr 9, 2024

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.

@cbiffle cbiffle requested a review from mkeeter April 9, 2024 20:04
return Err(e)
.map_err(MonorailError::from)
.map_err(RequestError::from);
return Err(RequestError::from(MonorailError::from(e)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how dare you, clippy

Copy link
Collaborator Author

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"

@cbiffle cbiffle force-pushed the cbiffle/warnings branch 3 times, most recently from aa7be08 to d8ab73d Compare April 9, 2024 20:37
@@ -834,7 +834,7 @@ fn main() -> ! {
.load_bitstream(AUXFLASH.get_task_id())
{
Err(e) => {
let code = u32::try_from(e).unwrap_lite();
Copy link
Collaborator

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

Comment on lines -49 to -50
sp_update: SpUpdate,
rot_update: RotUpdate,
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, #1731

Copy link
Collaborator

@labbott labbott left a 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.
@cbiffle cbiffle merged commit 1522fc4 into master Apr 11, 2024
103 checks passed
@cbiffle cbiffle deleted the cbiffle/warnings branch April 11, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants