fix codegen'ed lints
This commit is contained in:
parent
9231a8b37e
commit
8f800c1e91
1 changed files with 3 additions and 2 deletions
5
build.rs
5
build.rs
|
@ -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}}}")?;
|
||||
|
|
Loading…
Reference in a new issue