Skip to content

Commit

Permalink
Replaced match by unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
Trangar authored and VictorKoenders committed Sep 9, 2018
1 parent 421b336 commit f1ec75c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ extern crate vergen;
use vergen::{ConstantsFlags, Vergen};

fn main() {
let vergen = match Vergen::new(ConstantsFlags::all()) {
Ok(v) => v,
Err(err) => {
panic!(
"Vergen crate failed to generate version information! {:?}",
err
);
}
};
let vergen = Vergen::new(ConstantsFlags::all()).unwrap_or_else(|e| {
panic!(
"Vergen crate failed to generate version information! {:?}",
e
);
});

for (k, v) in vergen.build_info() {
println!("cargo:rustc-env={}={}", k.name(), v);
Expand Down

0 comments on commit f1ec75c

Please sign in to comment.