Skip to content

Commit 3d4a367

Browse files
committed
Fix clippy int_plus_one in aarch64 u8 filter bound
`while x + 16 <= w - 1` trips clippy::int_plus_one under rustc 1.95's stricter lint. Rewrite as `x + 16 < w` — identical iteration count (still stops once index x+16 would reach w) and avoids the `w - 1` underflow when w == 0.
1 parent e3cffe0 commit 3d4a367

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/yscv-imgproc/src/ops/u8_filters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ unsafe fn sobel_row_neon(
15441544

15451545
let mut x = 1usize;
15461546

1547-
while x + 16 <= w - 1 {
1547+
while x + 16 < w {
15481548
// Load 16 u8 at offsets x-1, x, x+1 for each row
15491549
let t_l = vld1q_u8(row0.add(x - 1));
15501550
let t_c = vld1q_u8(row0.add(x));

0 commit comments

Comments
 (0)