mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-04-15 13:36:34 +00:00
chore: satisfy clippy::manual_div_ceil
This only fires with Rust 1.83 or newer, but we can preempt this case with our current MSRV.
This commit is contained in:
parent
3032e9a43c
commit
13a533022e
@ -783,8 +783,7 @@ impl super::Queue {
|
||||
.buffer_layout
|
||||
.bytes_per_row
|
||||
.unwrap_or(copy.size.width * block_size);
|
||||
let minimum_rows_per_image =
|
||||
(copy.size.height + block_height - 1) / block_height;
|
||||
let minimum_rows_per_image = copy.size.height.div_ceil(block_height);
|
||||
let rows_per_image = copy
|
||||
.buffer_layout
|
||||
.rows_per_image
|
||||
|
@ -5901,8 +5901,8 @@ impl Extent3d {
|
||||
pub fn physical_size(&self, format: TextureFormat) -> Self {
|
||||
let (block_width, block_height) = format.block_dimensions();
|
||||
|
||||
let width = ((self.width + block_width - 1) / block_width) * block_width;
|
||||
let height = ((self.height + block_height - 1) / block_height) * block_height;
|
||||
let width = self.width.div_ceil(block_width) * block_width;
|
||||
let height = self.height.div_ceil(block_height) * block_height;
|
||||
|
||||
Self {
|
||||
width,
|
||||
|
Loading…
Reference in New Issue
Block a user