mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
Fix clippy lints (#2560)
This commit is contained in:
parent
d45e6b4119
commit
58f318550d
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -95,8 +95,7 @@ async fn setup<E: Example>(title: &str) -> Setup {
|
||||
use winit::platform::web::WindowExtWebSys;
|
||||
let query_string = web_sys::window().unwrap().location().search().unwrap();
|
||||
let level: log::Level = parse_url_query_string(&query_string, "RUST_LOG")
|
||||
.map(|x| x.parse().ok())
|
||||
.flatten()
|
||||
.and_then(|x| x.parse().ok())
|
||||
.unwrap_or(log::Level::Error);
|
||||
console_log::init_with_level(level).expect("could not initialize logger");
|
||||
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
|
||||
|
Loading…
Reference in New Issue
Block a user