diff options
| author | Eskil Queseth <eskilq@kth.se> | 2021-03-22 00:20:33 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2021-03-22 00:20:33 +0100 |
| commit | a8e24b8f92e23bb8c64d8056ac1a5d882cb94de2 (patch) | |
| tree | b9fc4b77af0f648f65912f1b7dae993c90ecb08e | |
| parent | f9d1f57e2df87ebfaecccdad230feadc1dffd609 (diff) | |
| download | mum-a8e24b8f92e23bb8c64d8056ac1a5d882cb94de2.tar.gz | |
inline variable
| -rw-r--r-- | mumctl/build.rs | 3 | ||||
| -rw-r--r-- | 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(), }; |
