Don't unwrap results in build step
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl 2022-02-17 12:01:50 +01:00
parent c4b14164c0
commit 5f29a3edfa

View File

@ -1,15 +1,12 @@
extern crate ructe; extern crate ructe;
extern crate vergen; extern crate vergen;
use ructe::Ructe; use ructe::{Ructe, RucteError};
use vergen::{vergen, Config, ShaKind}; use vergen::{vergen, Config, ShaKind};
fn main() { fn main() -> Result<(), RucteError> {
let mut config = Config::default(); let mut config = Config::default();
*config.git_mut().sha_kind_mut() = ShaKind::Short; *config.git_mut().sha_kind_mut() = ShaKind::Short;
vergen(config).expect("Unable to generate static repo info"); vergen(config).expect("Unable to generate static repo info");
Ructe::from_env() Ructe::from_env()?.compile_templates("templates")
.expect("ructe")
.compile_templates("templates")
.unwrap();
} }