Skip to content

Commit 1f331f1

Browse files
committed
Satisfy the demands of Clippy by adding a div_ceil
1 parent 86d2d2c commit 1f331f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/image/native_image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl NativeImage {
247247
pub fn swap_word_rows(&mut self) {
248248
let bpp = self.format.get_size().get_bpp();
249249
// Use ceiling division to handle non-byte-aligned widths correctly
250-
let bytes_per_row = (self.width * bpp + 7) / 8;
250+
let bytes_per_row = (self.width * bpp).div_ceil(8);
251251

252252
const WORD_SIZE: usize = 4;
253253
const SWAP_CHUNK_SIZE: usize = WORD_SIZE * 2;

0 commit comments

Comments
 (0)