Skip to content

Commit

Permalink
Fix clippy::ptr_arg lints (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Dec 25, 2024
1 parent bda7db0 commit 3139e43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/resvg/src/filter/iir_blur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<f64>) {
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;
}
Expand All @@ -77,7 +77,7 @@ fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut Vec
}
}

fn gaussianiir2d(d: &BlurData, buf: &mut Vec<f64>) {
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);
Expand Down

0 comments on commit 3139e43

Please sign in to comment.