Skip to content

Commit acba361

Browse files
committed
Resolve clippy lints
1 parent 6143d3d commit acba361

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl Manager {
162162
ChunkState {
163163
chunk,
164164
slot,
165-
renderable: slot.map_or(false, |idx| self.chunks[idx as usize].ready),
165+
renderable: slot.is_some_and(|idx| self.chunks[idx as usize].ready),
166166
},
167167
);
168168
}
@@ -224,7 +224,7 @@ impl Manager {
224224
let children_renderable = chunk.renderable // this subtree should be rendered at all, and
225225
&& child_slots // every child is already resident in the cache
226226
.iter()
227-
.all(|slot| slot.map_or(false, |x| self.chunks[x as usize].ready));
227+
.all(|slot| slot.is_some_and(|x| self.chunks[x as usize].ready));
228228
// If this subtree should be rendered and the children can't be rendered, this chunk must be rendered.
229229
if chunk.renderable && !children_renderable {
230230
self.render

src/cubemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ where
886886
fn size_hint(&self) -> (usize, Option<usize>) {
887887
let total = self.chunk_resolution * self.chunk_resolution;
888888
let remaining = (total - self.index) as usize;
889-
let x = (remaining + S::LANES - 1) / S::LANES;
889+
let x = remaining.div_ceil(S::LANES);
890890
(x, Some(x))
891891
}
892892
}

0 commit comments

Comments
 (0)