From 5fab78e1758dea19485f244e1cb39f90fc14000d Mon Sep 17 00:00:00 2001 From: Mikko Lehtonen Date: Thu, 27 Aug 2020 22:11:42 +0300 Subject: [PATCH] Address nits in #897 --- wgpu-core/src/command/bundle.rs | 2 +- wgpu-core/src/command/render.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index 2272322c6..39d31c4bc 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -722,7 +722,7 @@ impl Global { bundle_encoder .context .check_compatible(&pipeline.pass_context) - .map_err(|e| RenderCommandError::IncompatiblePipeline(e))?; + .map_err(RenderCommandError::IncompatiblePipeline)?; //TODO: check read-only depth diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index a2cb016f7..6bdfc1b26 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1018,7 +1018,7 @@ impl Global { context .check_compatible(&pipeline.pass_context) - .map_err(|e| RenderCommandError::IncompatiblePipeline(e))?; + .map_err(RenderCommandError::IncompatiblePipeline)?; if pipeline.flags.contains(PipelineFlags::WRITES_DEPTH_STENCIL) && is_ds_read_only @@ -1515,7 +1515,7 @@ impl Global { context .check_compatible(&bundle.context) - .map_err(|e| RenderPassError::IncompatibleRenderBundle(e))?; + .map_err(RenderPassError::IncompatibleRenderBundle)?; unsafe { bundle.execute(