Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hakolao committed Jan 30, 2022
1 parent 97de188 commit fb60589
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/circle/render_system_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub fn main_render_system(
.frame(
[0.0; 4],
before_future.into_inner(),
final_image_view.clone(),
final_image_view,
world_to_screen,
)
.unwrap();
Expand Down
5 changes: 3 additions & 2 deletions examples/windowless_compute/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fn run_compute_shader_once_then_exit(
mut app_exit_events: EventWriter<AppExit>,
) {
// Create pipeline
#[allow(clippy::needless_question_mark)]
let pipeline = {
mod cs {
vulkano_shaders::shader! {
Expand Down Expand Up @@ -60,7 +61,7 @@ fn run_compute_shader_once_then_exit(
};
// Create buffer
let data_buffer = {
let data_iter = (0..65536u32).map(|n| n);
let data_iter = (0..65536u32).collect::<Vec<u32>>();
CpuAccessibleBuffer::from_iter(
vulkano_context.device(),
BufferUsage {
Expand Down Expand Up @@ -94,7 +95,7 @@ fn run_compute_shader_once_then_exit(
PipelineBindPoint::Compute,
pipeline.layout().clone(),
0,
set.clone(),
set,
)
.dispatch([1024, 1, 1])
.unwrap();
Expand Down
6 changes: 6 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ impl ImageTextureId {
}
}

impl Default for ImageTextureId {
fn default() -> Self {
Self::new()
}
}

pub const DEFAULT_IMAGE_FORMAT: Format = Format::R8G8B8A8_UNORM;

/// Creates a storage image on device
Expand Down
2 changes: 1 addition & 1 deletion src/winit_window_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl VulkanoWinitWindows {
self.window_id_to_winit
.get(&id)
.and_then(|id| self.windows.get(id))
.and_then(|v_window| Some(v_window.window()))
.map(|v_window| v_window.window())
}

pub fn get_window_id(&self, id: winit::window::WindowId) -> Option<WindowId> {
Expand Down

0 comments on commit fb60589

Please sign in to comment.