From a7d3b604dca515a388f62788de423f3f28025814 Mon Sep 17 00:00:00 2001 From: Frizi Date: Thu, 17 Jun 2021 17:45:26 +0200 Subject: [PATCH] [wgsl-in] fix clippy warnings on `to_wgsl` methods --- src/front/wgsl/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/front/wgsl/mod.rs b/src/front/wgsl/mod.rs index cee4cab0a3..bab096fe3c 100644 --- a/src/front/wgsl/mod.rs +++ b/src/front/wgsl/mod.rs @@ -364,9 +364,9 @@ impl<'a> Error<'a> { } impl crate::StorageFormat { - pub fn to_wgsl(&self) -> &str { + pub fn to_wgsl(self) -> &'static str { use crate::StorageFormat as Sf; - match *self { + match self { Sf::R8Unorm => "r8unorm", Sf::R8Snorm => "r8snorm", Sf::R8Uint => "r8uint", @@ -574,8 +574,8 @@ impl crate::ScalarKind { /// Format a scalar kind+width as a type is written in wgsl. /// /// Examples: `f32`, `u64`, `bool`. - fn to_wgsl(&self, width: u8) -> String { - let prefix = match *self { + fn to_wgsl(self, width: u8) -> String { + let prefix = match self { crate::ScalarKind::Sint => "i", crate::ScalarKind::Uint => "u", crate::ScalarKind::Float => "f",