We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fd3adf287da8d4e6ee17a97aec2ec8be
Code:
#[allow(clippy::identity_op)] #[inline] fn fill_output_color(output_texture: &mut [u8], idx: usize, color: u16) { let r = ((color >> 0) & 0x001F) as u8; let g = ((color >> 5) & 0x001F) as u8; let b = ((color >> 10) & 0x001F) as u8; let col5_to_col8 = |x| (x << 3) | (x >> 2); output_texture[(idx * 3) + 0] = col5_to_col8(r); // Lint triggered here output_texture[(idx * 3) + 1] = col5_to_col8(g); output_texture[(idx * 3) + 2] = col5_to_col8(b); }
The text was updated successfully, but these errors were encountered:
Is this a duplicate of #3354?
Sorry, something went wrong.
Duplicate of #3354
Thanks for noticing @mikerite
No branches or pull requests
Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fd3adf287da8d4e6ee17a97aec2ec8be
Code:
The text was updated successfully, but these errors were encountered: