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 clippy::precedence lint #117

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

waywardmonkeys
Copy link
Collaborator

No description provided.

@waywardmonkeys waywardmonkeys added this to the 0.2.2 milestone Dec 28, 2024
@waywardmonkeys
Copy link
Collaborator Author

This is a new default-enabled lint in nightly clippy.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

I agree, and generally try to be explicit in new code.

Not suggesting it for this particular issue, but one thing I've found is that multiply-add is sometimes cleaner code, r0 * 16 + r1. It used to be that you wanted to write the shift explicitly because it was more optimized, but that was when I was a little kid, really.

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Jan 2, 2025
Merged via the queue into linebender:main with commit 6378688 Jan 2, 2025
16 checks passed
@waywardmonkeys waywardmonkeys deleted the fix-precedence-lint branch January 2, 2025 02:00
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.

2 participants