This commit is contained in:
Chad Brokaw 2023-01-25 16:05:01 -05:00 committed by Arman Uguray
parent a532eacf7b
commit 87803cc8a6
2 changed files with 3 additions and 7 deletions

View file

@ -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>,")?;