diff --git a/librashader-runtime-vk/src/filter_chain.rs b/librashader-runtime-vk/src/filter_chain.rs index 3f2e674..296e63c 100644 --- a/librashader-runtime-vk/src/filter_chain.rs +++ b/librashader-runtime-vk/src/filter_chain.rs @@ -185,8 +185,8 @@ impl FrameResiduals { } } for framebuffer in self.framebuffers.drain(0..) { - if let Some(framebuffer) = framebuffer - && framebuffer != vk::Framebuffer::null() + if let Some(framebuffer) = + framebuffer.filter(|framebuffer| *framebuffer != vk::Framebuffer::null()) { unsafe { self.device.destroy_framebuffer(framebuffer, None); diff --git a/librashader-runtime-vk/src/graphics_pipeline.rs b/librashader-runtime-vk/src/graphics_pipeline.rs index 1eefb67..a52e317 100644 --- a/librashader-runtime-vk/src/graphics_pipeline.rs +++ b/librashader-runtime-vk/src/graphics_pipeline.rs @@ -34,9 +34,7 @@ impl PipelineDescriptors<'_> { } pub fn add_ubo_binding(&mut self, ubo_meta: Option<&BufferReflection>) { - if let Some(ubo_meta) = ubo_meta - && !ubo_meta.stage_mask.is_empty() - { + if let Some(ubo_meta) = ubo_meta.filter(|ubo_meta| !ubo_meta.stage_mask.is_empty()) { let ubo_mask = util::binding_stage_to_vulkan_stage(ubo_meta.stage_mask); self.layout_bindings.push(vk::DescriptorSetLayoutBinding { diff --git a/librashader-runtime-vk/src/lib.rs b/librashader-runtime-vk/src/lib.rs index bc6334b..8059e46 100644 --- a/librashader-runtime-vk/src/lib.rs +++ b/librashader-runtime-vk/src/lib.rs @@ -4,7 +4,6 @@ //! See [`librashader::runtime::vk`](https://docs.rs/librashader/latest/librashader/runtime/vk/index.html) instead. #![deny(unsafe_op_in_unsafe_fn)] #![feature(type_alias_impl_trait)] -#![feature(let_chains)] mod draw_quad; mod filter_chain;