Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix clippy lints
Browse files Browse the repository at this point in the history
a1phyr committed Mar 28, 2022
1 parent d45e6b4 commit 36f62fa
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wgpu-core/src/device/life.rs
Original file line number Diff line number Diff line change
@@ -374,7 +374,7 @@ impl<A: hal::Api> LifetimeTracker<A> {
.active
.iter()
.position(|a| a.index > last_done)
.unwrap_or_else(|| self.active.len());
.unwrap_or(self.active.len());

let mut work_done_closures = SmallVec::new();
for a in self.active.drain(..done_count) {
3 changes: 1 addition & 2 deletions wgpu-core/src/init_tracker/mod.rs
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ where
.partition_point(|r| r.end <= query_range.start);
self.uninitialized_ranges
.get(index)
.map(|start_range| {
.and_then(|start_range| {
if start_range.start < query_range.end {
let start = start_range.start.max(query_range.start);
match self.uninitialized_ranges.get(index + 1) {
@@ -160,7 +160,6 @@ where
None
}
})
.flatten()
}

// Drains uninitialized ranges in a query range.

0 comments on commit 36f62fa

Please sign in to comment.