Fix clippy lints for Rust 1.90

This commit is contained in:
Héctor Ramón Jiménez 2025-09-19 18:22:45 +02:00
parent 53e4976915
commit db5a1f6353
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 4 additions and 6 deletions

View file

@ -11,7 +11,7 @@ pub fn from_rgba(
) -> Result<Icon, Error> {
const PIXEL_SIZE: usize = mem::size_of::<u8>() * 4;
if rgba.len() % PIXEL_SIZE != 0 {
if !rgba.len().is_multiple_of(PIXEL_SIZE) {
return Err(Error::ByteCountNotDivisibleBy4 {
byte_count: rgba.len(),
});