Skip to content

chore: Fix nightly clippy lint: clippy::if_then_panic #5400

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

Merged
merged 3 commits into from
Oct 2, 2021

Conversation

torokati44
Copy link
Member

Also note the // XXX comment about a potential typo / copy-paste error found by accident.

@torokati44
Copy link
Member Author

What do you think about the typo note, @adrian17? Should that be fixed or left as is?

@torokati44
Copy link
Member Author

Huh, my own local nightly clippy doesn't complain about these bunch of instances caught by CI. I just updated it... Weird.

@danielhjacobs
Copy link
Contributor

The == asserts could be changed to assert_eq! (See also rust-lang/rust-clippy#7716)

@torokati44 torokati44 force-pushed the clippy_if_then_panic branch 2 times, most recently from 6443cda to 84f720c Compare September 30, 2021 21:39
@torokati44
Copy link
Member Author

Yep, you are right, fixed!

@danielhjacobs
Copy link
Contributor

@torokati44
Copy link
Member Author

Yep, almost done with the PR for that... :)

@torokati44
Copy link
Member Author

There: brendanzab/approx#72

@torokati44
Copy link
Member Author

torokati44 commented Sep 30, 2021

So, best case scenario now: The PR is accepted soon, a new version of approx is released not much later, dependabot picks it up and bumps it, so the remaining warning goes away on its own, all before the lint makes it into stable clippy.
The rest of the fixes here can go in until then, I think.
That potential typo/copypasta error might be worth a separate PR, just so behavior is not changed here.

@relrelb
Copy link
Contributor

relrelb commented Oct 1, 2021

There: brendanzab/approx#72

Assuming it will take time for the PR to be merged (and a new approx version to be released), for now we can add #[allow(clippy::if_then_panic)] where needed in core/src/matrix.rs, and place TODOs referring to that PR.

@torokati44 torokati44 force-pushed the clippy_if_then_panic branch from 84f720c to cc261c6 Compare October 2, 2021 12:29
@torokati44
Copy link
Member Author

Thanks for the review @relrelb, I have applied your suggestions.

Copy link
Contributor

@relrelb relrelb left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! Will merge once CI passes.

@relrelb
Copy link
Contributor

relrelb commented Oct 2, 2021

Looks like the nightly Rust compiler is broken, as it emits hundreds of errors now. Will merge anyway when the required workflows finish.

@torokati44
Copy link
Member Author

Yeah, saw the same thing on my machine too, will probably be fixed in a day or two.
Alright!

@relrelb relrelb merged commit a1ee508 into ruffle-rs:master Oct 2, 2021
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.

4 participants