summary refs log tree commit diff
path: root/build.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-14 02:35:23 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-14 02:35:23 -0700
commit5a4fad7b67a6ab477b230f4d8a70efed0e9100cb (patch)
tree95f10f8106a225e0fcd4a1fbd0d0bca2ced51b38 /build.rs
parent19e3a0f319fd04c1dde803796ec272d038b634f7 (diff)
move all the per-frame stuff into its own struct and file
Force-Push: yes
Change-Id: I54b5c8fcc692616f83a37039a445796dddd4b7e4
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/build.rs b/build.rs
index fcd166d..67fb6d3 100644
--- a/build.rs
+++ b/build.rs
@@ -170,8 +170,9 @@ fn generate_asset_module(asset_paths: BTreeSet<PathBuf>) -> Result<()> {
 
   println!("cargo::warning=assets {:?}", asset_paths);
   writeln!(file, "#[deny(unsafe_code)]")?;
-  writeln!(file, "pub fn asset(name: &str) -> crate::error::Result<&[u8]> {{");
-  writeln!(file, "  match name {{");
+  writeln!(file,
+           "pub fn asset(name: &str) -> crate::error::Result<&[u8]> {{")?;
+  writeln!(file, "  match name {{")?;
 
   for asset_path in asset_paths {
     let name = if asset_path.starts_with(&out_dir) {
@@ -204,14 +205,14 @@ fn generate_asset_module(asset_paths: BTreeSet<PathBuf>) -> Result<()> {
 
     writeln!(file, "    \"{}\" => Ok(include_bytes!(\"{}\")),",
              name.escape_default(),
-             include_path.escape_default());
+             include_path.escape_default())?;
   }
 
-  writeln!(file, "    _ => Err(crate::error::Error {{");
-  writeln!(file, "      message: format!(\"No such asset {{:?}}\", name)");
-  writeln!(file, "    }})");
-  writeln!(file, "  }}");
-  writeln!(file, "}}");
+  writeln!(file, "    _ => Err(crate::error::Error {{")?;
+  writeln!(file, "      message: format!(\"No such asset {{:?}}\", name)")?;
+  writeln!(file, "    }})")?;
+  writeln!(file, "  }}")?;
+  writeln!(file, "}}")?;
 
   Ok(())
 }