From 5877dc8d521fcfac71ef76b3b90f114cf67e17d4 Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Thu, 19 Sep 2024 20:36:47 +0200 Subject: [PATCH] Clippy fixes --- src/redacters/simple_image_redacter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redacters/simple_image_redacter.rs b/src/redacters/simple_image_redacter.rs index 852360f..9602700 100644 --- a/src/redacters/simple_image_redacter.rs +++ b/src/redacters/simple_image_redacter.rs @@ -34,8 +34,8 @@ pub fn redact_rgba_image_at_coords( for y in ((y1 - y1 * approximation_factor) as u32)..((y2 + y2 * approximation_factor) as u32) { - let safe_x = x.min(image.width() - 1).max(0); - let safe_y = y.min(image.height() - 1).max(0); + let safe_x = x.min(image.width() - 1); + let safe_y = y.min(image.height() - 1); image.put_pixel(safe_x, safe_y, image::Rgb([0, 0, 0])); } }