Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
[wgsl-in] fix clippy warnings on to_wgsl methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi authored and kvark committed Jun 17, 2021
1 parent 3370147 commit a7d3b60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/front/wgsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit a7d3b60

Please sign in to comment.