From ca651f07cb38acbbe2cf67af7a2a535bf7567dd0 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 9 Dec 2018 08:01:13 -0600 Subject: [PATCH] rustfmt --- examples/src/bin/texture.rs | 12 ++++++++---- examples/src/bin/triangle.rs | 6 ++++-- examples/src/lib.rs | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index ba1a6f6..87749c5 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -390,11 +390,13 @@ fn main() { .aspect_mask(vk::ImageAspectFlags::COLOR) .layer_count(1) .build(), - ).image_extent(vk::Extent3D { + ) + .image_extent(vk::Extent3D { width: image_dimensions.0, height: image_dimensions.1, depth: 1, - }).build()]; + }) + .build()]; device.cmd_copy_buffer_to_image( texture_command_buffer, @@ -551,10 +553,12 @@ fn main() { let mut frag_spv_file = File::open(Path::new("shader/texture/frag.spv")).expect("Could not find frag.spv."); - let vertex_code = read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); + let vertex_code = + read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code); - let frag_code = read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); + let frag_code = + read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code); let vertex_shader_module = base diff --git a/examples/src/bin/triangle.rs b/examples/src/bin/triangle.rs index 09a4eb2..8e18738 100644 --- a/examples/src/bin/triangle.rs +++ b/examples/src/bin/triangle.rs @@ -207,10 +207,12 @@ fn main() { let mut frag_spv_file = File::open(Path::new("shader/triangle/frag.spv")).expect("Could not find frag.spv."); - let vertex_code = read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); + let vertex_code = + read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code); - let frag_code = read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); + let frag_code = + read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code); let vertex_shader_module = base diff --git a/examples/src/lib.rs b/examples/src/lib.rs index daa1ba1..362e047 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -579,7 +579,8 @@ impl ExampleBase { .dst_access_mask( vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ | vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE, - ).new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL) + ) + .new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL) .old_layout(vk::ImageLayout::UNDEFINED) .subresource_range( vk::ImageSubresourceRange::builder() @@ -587,7 +588,8 @@ impl ExampleBase { .layer_count(1) .level_count(1) .build(), - ).build(); + ) + .build(); device.cmd_pipeline_barrier( setup_command_buffer, @@ -608,7 +610,8 @@ impl ExampleBase { .level_count(1) .layer_count(1) .build(), - ).image(depth_image) + ) + .image(depth_image) .format(depth_image_create_info.format) .view_type(vk::ImageViewType::TYPE_2D) .build();