Remove unused commit_hash struct field

pull/593/head^2
Wilfred Hughes 2023-11-18 16:31:13 +07:00
parent 4c387e4cfe
commit 1138a4623d
2 changed files with 2 additions and 5 deletions

@ -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())
}

@ -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,