fix codegen'ed lints
Some checks failed
Rust / rustfmt (pull_request) Successful in 24s
Rust / clippy (pull_request) Failing after 1m24s
Rust / build (pull_request) Failing after 3m12s

This commit is contained in:
Dominic 2024-07-06 22:17:10 +02:00
parent 9231a8b37e
commit 8f800c1e91
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D

View file

@ -31,6 +31,7 @@ impl AssetsWriter {
fn new<P: AsRef<Path>>(path: P) -> Self {
let mut file = File::create(path).expect("Failed to create assets file");
writeln!(file, "// @generated").unwrap();
writeln!(file, "#![allow(dead_code)]").unwrap();
Self {
file,
root: Assets::default()
@ -80,14 +81,14 @@ impl AssetsWriter {
for asset_name in root.assets.keys() {
writeln!(
file,
"pub {indent}\t{}: comfy::TextureHandle,",
"{indent}\tpub {}: comfy::TextureHandle,",
asset_name.to_snake_case()
)?;
}
for group_name in root.groups.keys() {
writeln!(
file,
"pub {indent}\t{group_name}: &'static {group_name}::Assets,"
"{indent}\tpub {group_name}: &'static {group_name}::Assets,"
)?;
}
writeln!(file, "{indent}}}")?;