From 1138a4623d11e0c14452312955874dd605983b19 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 18 Nov 2023 16:31:13 -0800 Subject: [PATCH] Remove unused commit_hash struct field --- build.rs | 2 +- src/version.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build.rs b/build.rs index b08fa5eeb..2da2a0600 100644 --- a/build.rs +++ b/build.rs @@ -390,7 +390,7 @@ fn commit_info() { let stdout = String::from_utf8(output.stdout).unwrap(); let mut parts = stdout.split_whitespace(); let mut next = || parts.next().unwrap(); - println!("cargo:rustc-env=DFT_COMMIT_HASH={}", next()); + let _commit_hash = next(); println!("cargo:rustc-env=DFT_COMMIT_SHORT_HASH={}", next()); println!("cargo:rustc-env=DFT_COMMIT_DATE={}", next()) } diff --git a/src/version.rs b/src/version.rs index 45c42a622..84e435808 100644 --- a/src/version.rs +++ b/src/version.rs @@ -4,7 +4,6 @@ use lazy_static::lazy_static; pub(crate) struct CommitInfo { pub(crate) short_commit_hash: &'static str, - pub(crate) commit_hash: &'static str, pub(crate) commit_date: &'static str, } @@ -32,12 +31,10 @@ pub(crate) const fn version() -> VersionInfo { let version = env!("CARGO_PKG_VERSION"); let commit_info = match ( option_env!("DFT_COMMIT_SHORT_HASH"), - option_env!("DFT_COMMIT_HASH"), option_env!("DFT_COMMIT_DATE"), ) { - (Some(short_commit_hash), Some(commit_hash), Some(commit_date)) => Some(CommitInfo { + (Some(short_commit_hash), Some(commit_date)) => Some(CommitInfo { short_commit_hash, - commit_hash, commit_date, }), _ => None,