Clippy fixes for windows platform (#2131)

This commit is contained in:
Lucas Kent 2022-03-24 05:08:04 +11:00 committed by GitHub
parent e22c76b3ac
commit 7369551c02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 20 deletions

View file

@ -18,7 +18,7 @@ use crate::icon::*;
use super::util;
impl Pixel {
fn to_bgra(&mut self) {
fn convert_to_bgra(&mut self) {
mem::swap(&mut self.r, &mut self.b);
}
}
@ -32,7 +32,7 @@ impl RgbaIcon {
unsafe { std::slice::from_raw_parts_mut(rgba.as_ptr() as *mut Pixel, pixel_count) };
for pixel in pixels {
and_mask.push(pixel.a.wrapping_sub(std::u8::MAX)); // invert alpha channel
pixel.to_bgra();
pixel.convert_to_bgra();
}
assert_eq!(and_mask.len(), pixel_count);
let handle = unsafe {