From d035ff4d412fc574d83988ef76dac0f508422c62 Mon Sep 17 00:00:00 2001 From: sharkAndshar Date: Tue, 10 Dec 2024 16:31:56 +0800 Subject: [PATCH] clippy --- martin/src/cog/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/martin/src/cog/mod.rs b/martin/src/cog/mod.rs index a3e5c22bd..54aa0a8f6 100644 --- a/martin/src/cog/mod.rs +++ b/martin/src/cog/mod.rs @@ -331,8 +331,8 @@ fn get_grid_dims( ) -> Result<(u32, u32), FileError> { let (tile_width, tile_height) = (decoder.chunk_dimensions().0, decoder.chunk_dimensions().1); let (image_width, image_length) = get_image_dims(decoder, path, image_ifd)?; - let tiles_across = (image_width + tile_width - 1) / tile_width; - let tiles_down = (image_length + tile_height - 1) / tile_height; + let tiles_across = image_width.div_ceil(tile_width); + let tiles_down = image_length.div_ceil(tile_height); Ok((tiles_across, tiles_down)) }