Skip to content

Commit 083468d

Browse files
committed
Fixed Rust issue 41620
See rust-lang/rust#41620
1 parent c116223 commit 083468d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/imageops/sample.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ pub fn filter3x3<I, P, S>(image: &I, kernel: &[f32])
308308
let max: f32 = NumCast::from(max).unwrap();
309309

310310
let sum = match kernel.iter().fold(0.0, |s, &item| s + item) {
311-
0.0 => 1.0,
311+
x if x == 0.0 => 1.0,
312312
sum => sum
313313
};
314314
let sum = (sum, sum, sum, sum);

0 commit comments

Comments
 (0)