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 build warnings in recent Rust 1.69.0 #23

Merged
merged 1 commit into from
May 27, 2023
Merged

Conversation

keepsimple1
Copy link
Owner

@keepsimple1 keepsimple1 commented May 26, 2023

Since our minimum Rust version is 1.46.0, these warnings were not reported in CI.

Warning log in Rust 1.69.0:

warning: unnecessary parentheses around index expression
   --> src/lib.rs:712:24
    |
712 |                 ^ (TE1[(temp >> 24)] & 0x000000ff)
    |                        ^          ^
    |
    = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
    |
712 -                 ^ (TE1[(temp >> 24)] & 0x000000ff)
712 +                 ^ (TE1[temp >> 24] & 0x000000ff)
    |

warning: unnecessary parentheses around index expression
   --> src/lib.rs:738:24
    |
738 |                 ^ (TE1[(temp >> 24)] & 0x000000ff)
    |                        ^          ^
    |
help: remove these parentheses
    |
738 -                 ^ (TE1[(temp >> 24)] & 0x000000ff)
738 +                 ^ (TE1[temp >> 24] & 0x000000ff)
    |

warning: unnecessary parentheses around index expression
   --> src/lib.rs:767:24
    |
767 |                 ^ (TE1[(temp >> 24)] & 0x000000ff)
    |                        ^          ^
    |
help: remove these parentheses
    |
767 -                 ^ (TE1[(temp >> 24)] & 0x000000ff)
767 +                 ^ (TE1[temp >> 24] & 0x000000ff)
    |

warning: unnecessary parentheses around index expression
   --> src/lib.rs:780:24
    |
780 |                 ^ (TE2[(temp >> 24)] & 0xff000000)
    |                        ^          ^
    |
help: remove these parentheses
    |
780 -                 ^ (TE2[(temp >> 24)] & 0xff000000)
780 +                 ^ (TE2[temp >> 24] & 0xff000000)
    |

@keepsimple1 keepsimple1 merged commit 107d093 into master May 27, 2023
@keepsimple1 keepsimple1 deleted the fix-build-warnings branch May 27, 2023 14:18
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.

1 participant