mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-08 20:01:30 +11:00
fmt
This commit is contained in:
parent
a532eacf7b
commit
87803cc8a6
|
@ -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>,")?;
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue