From 5f29a3edfaa5695d751f970a5d69e59e94f1e0d3 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Thu, 17 Feb 2022 12:01:50 +0100 Subject: [PATCH] Don't unwrap results in build step --- build.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build.rs b/build.rs index 75d940e..279203a 100644 --- a/build.rs +++ b/build.rs @@ -1,15 +1,12 @@ extern crate ructe; extern crate vergen; -use ructe::Ructe; +use ructe::{Ructe, RucteError}; use vergen::{vergen, Config, ShaKind}; -fn main() { +fn main() -> Result<(), RucteError> { let mut config = Config::default(); *config.git_mut().sha_kind_mut() = ShaKind::Short; vergen(config).expect("Unable to generate static repo info"); - Ructe::from_env() - .expect("ructe") - .compile_templates("templates") - .unwrap(); + Ructe::from_env()?.compile_templates("templates") }