From 3139e43d314e3762a3f886d523c057c263296351 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 25 Dec 2024 12:04:51 -0500 Subject: [PATCH] Fix `clippy::ptr_arg` lints (#869) --- crates/resvg/src/filter/iir_blur.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/resvg/src/filter/iir_blur.rs b/crates/resvg/src/filter/iir_blur.rs index e49608b2..5af7009b 100644 --- a/crates/resvg/src/filter/iir_blur.rs +++ b/crates/resvg/src/filter/iir_blur.rs @@ -65,7 +65,7 @@ pub fn apply(sigma_x: f64, sigma_y: f64, src: ImageRefMut) { gaussian_channel(data, &d, 3, buf); } -fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut Vec) { +fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut [f64]) { for i in 0..data.len() / 4 { buf[i] = data[i * 4 + channel] as f64 / 255.0; } @@ -77,7 +77,7 @@ fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut Vec } } -fn gaussianiir2d(d: &BlurData, buf: &mut Vec) { +fn gaussianiir2d(d: &BlurData, buf: &mut [f64]) { // Filter horizontally along each row. let (lambda_x, dnu_x) = if d.sigma_x > 0.0 { let (lambda, dnu) = gen_coefficients(d.sigma_x, d.steps);