refactor(build.rs): handle errors without panic

This has no real difference to the user, just makes it easier to find
uses of .expect with grep.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-07-29 14:15:08 +03:00
parent 1e736c46ea
commit 15ae4148c9
+4 -1
View File
@@ -23,5 +23,8 @@ fn main() {
println!("cargo:rustc-env=GIT_HEAD={hash}");
println!("cargo:rustc-rerun-if-changed=.git/HEAD");
subplot_build::codegen("ci-broker.subplot").expect("failed to generate code with Subplot");
if let Err(e) = subplot_build::codegen("ci-broker.subplot") {
eprintln!("failed to generate code with Subplot: {e}");
std::process::exit(1);
}
}