move the codegen'ed allow somewhere else
All checks were successful
Rust / rustfmt (pull_request) Successful in 20s
Rust / clippy (pull_request) Successful in 1m15s
Rust / build (pull_request) Successful in 2m17s

This commit is contained in:
Dominic 2024-07-06 22:19:25 +02:00
parent 8f800c1e91
commit 0f1717675f
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D

View file

@ -31,7 +31,6 @@ 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()
@ -77,6 +76,7 @@ impl AssetsWriter {
writeln!(file, "}}")?;
}
writeln!(file, "{indent}#[allow(dead_code)]")?;
writeln!(file, "{indent}pub struct Assets {{")?;
for asset_name in root.assets.keys() {
writeln!(