From a8e24b8f92e23bb8c64d8056ac1a5d882cb94de2 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Mon, 22 Mar 2021 00:20:33 +0100 Subject: inline variable --- mumctl/build.rs | 3 +-- mumd/build.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mumctl/build.rs b/mumctl/build.rs index 78f279f..0a4f506 100644 --- a/mumctl/build.rs +++ b/mumctl/build.rs @@ -1,8 +1,7 @@ use std::process::Command; fn main() { - let maybe_hash = commit_hash(); - let version = match maybe_hash.as_deref() { + let version = match commit_hash().as_deref() { None | Some("") => format!("v{}", env!("CARGO_PKG_VERSION")), Some(version) => version.to_string(), }; diff --git a/mumd/build.rs b/mumd/build.rs index 78f279f..0a4f506 100644 --- a/mumd/build.rs +++ b/mumd/build.rs @@ -1,8 +1,7 @@ use std::process::Command; fn main() { - let maybe_hash = commit_hash(); - let version = match maybe_hash.as_deref() { + let version = match commit_hash().as_deref() { None | Some("") => format!("v{}", env!("CARGO_PKG_VERSION")), Some(version) => version.to_string(), }; -- cgit v1.2.1