fix: add clippy override to allow funcions > 100 lines

This commit is contained in:
Valentin Weber 2025-07-19 17:22:48 +02:00
parent f6379b814d
commit b4d8c1ab97
No known key found for this signature in database
GPG key ID: 44797000F143F522

View file

@ -1,5 +1,6 @@
#![warn(clippy::all, clippy::pedantic)] #![warn(clippy::all, clippy::pedantic)]
#![allow(clippy::unnecessary_debug_formatting)] #![allow(clippy::unnecessary_debug_formatting)]
#![allow(clippy::too_many_lines)]
use std::{fs, io::BufReader, path::PathBuf}; use std::{fs, io::BufReader, path::PathBuf};
@ -236,7 +237,7 @@ fn generate_payload(args: &mut Args) -> Result<PayloadBuffer> {
.resize(u32::MAX, 11, FilterType::Nearest) .resize(u32::MAX, 11, FilterType::Nearest)
.into_luma8(); .into_luma8();
let (width, height) = img.dimensions(); let (width, height) = img.dimensions();
let mut buffer = payload.add_message(style, (width as usize + 7) / 8); let mut buffer = payload.add_message(style, (width as usize).div_ceil(8));
for y in 0..height { for y in 0..height {
for x in 0..width { for x in 0..width {
if img.get_pixel(x, y).0 > [31] { if img.get_pixel(x, y).0 > [31] {
@ -259,7 +260,7 @@ fn generate_payload(args: &mut Args) -> Result<PayloadBuffer> {
anyhow::bail!("Expected 44x11 pixel gif file"); anyhow::bail!("Expected 44x11 pixel gif file");
} }
let mut buffer = payload.add_message(style, (48 * frame_count + 7) / 8); let mut buffer = payload.add_message(style, (48 * frame_count).div_ceil(8));
for (i, frame) in frames.iter().enumerate() { for (i, frame) in frames.iter().enumerate() {
let buf = frame.buffer(); let buf = frame.buffer();