From 87803cc8a6ebec596d7c00697aa5e649fb341b14 Mon Sep 17 00:00:00 2001 From: Chad Brokaw Date: Wed, 25 Jan 2023 16:05:01 -0500 Subject: [PATCH] fmt --- vello_shaders/build.rs | 6 +----- vello_shaders/src/compile/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/vello_shaders/build.rs b/vello_shaders/build.rs index 4c0c20e..aa13e97 100644 --- a/vello_shaders/build.rs +++ b/vello_shaders/build.rs @@ -3,7 +3,6 @@ mod compile; #[path = "src/types.rs"] mod types; -use std::collections::HashMap; use std::env; use std::fmt::Write; use std::path::Path; @@ -35,10 +34,7 @@ fn main() { println!("cargo:rerun-if-changed=../shader"); } -fn write_types( - buf: &mut String, - shaders: &[(String, ShaderInfo)], -) -> Result<(), std::fmt::Error> { +fn write_types(buf: &mut String, shaders: &[(String, ShaderInfo)]) -> Result<(), std::fmt::Error> { writeln!(buf, "pub struct Shaders<'a> {{")?; for (name, _) in shaders { writeln!(buf, " pub {name}: ComputeShader<'a>,")?; diff --git a/vello_shaders/src/compile/mod.rs b/vello_shaders/src/compile/mod.rs index c995b0d..c1815a4 100644 --- a/vello_shaders/src/compile/mod.rs +++ b/vello_shaders/src/compile/mod.rs @@ -65,8 +65,8 @@ impl ShaderInfo { continue; } let Some(binding) = &var.binding else { - continue; - }; + continue; + }; let mut resource = BindingInfo { name: var.name.clone(), location: (binding.group, binding.binding),