Cleanup, better use of some rust std lib functions

This commit is contained in:
Andreas Reich 2021-01-30 09:59:51 +01:00
parent cc183c885f
commit da86b3f401
4 changed files with 5 additions and 6 deletions

View File

@ -206,8 +206,7 @@ impl RenderBundleEncoder {
.map_pass_err(scope);
}
buffer_memory_init_actions
.extend(bind_group.used_buffer_ranges.iter().map(|x| x.clone()));
buffer_memory_init_actions.extend_from_slice(&bind_group.used_buffer_ranges);
state.set_bind_group(index, bind_group_id, bind_group.layout_id, offsets);
state

View File

@ -342,7 +342,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
Err(_) => false,
})
.map(|action| action.clone()),
.cloned(),
);
if let Some((pipeline_layout_id, follow_ups)) = state.binder.provide_entry(

View File

@ -1128,7 +1128,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
Err(_) => false,
})
.map(|action| action.clone()),
.cloned(),
);
if let Some((pipeline_layout_id, follow_ups)) = state.binder.provide_entry(
@ -1897,7 +1897,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
Err(_) => false,
})
.map(|action| action.clone()),
.cloned(),
);
unsafe {

View File

@ -9,7 +9,7 @@ use crate::{
GfxBackend, Global, GlobalIdentityHandlerFactory, Hub, Input, InvalidId, Storage, Token,
},
id, instance,
memory_init_tracker::*,
memory_init_tracker::{MemoryInitKind, MemoryInitTracker, MemoryInitTrackerAction},
pipeline, resource, span, swap_chain,
track::{BufferState, TextureSelector, TextureState, TrackerSet},
validation::{self, check_buffer_usage, check_texture_usage},