From 477c534cd7e151b4e2fdee703043872c4c77ea96 Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Mon, 1 Sep 2025 02:03:55 -0400 Subject: [PATCH] Remove dependency on target_info. (#7964) Remove dependency on target_info, use standard library instead. --- Cargo.lock | 7 ------- common/lighthouse_version/Cargo.toml | 1 - common/lighthouse_version/src/lib.rs | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bd65e1721..e64ffca53e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5687,7 +5687,6 @@ version = "0.1.0" dependencies = [ "git-version", "regex", - "target_info", ] [[package]] @@ -9192,12 +9191,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "target_info" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" - [[package]] name = "task_executor" version = "0.1.0" diff --git a/common/lighthouse_version/Cargo.toml b/common/lighthouse_version/Cargo.toml index cb4a43e407..b7e669ed94 100644 --- a/common/lighthouse_version/Cargo.toml +++ b/common/lighthouse_version/Cargo.toml @@ -7,7 +7,6 @@ edition = { workspace = true } [dependencies] git-version = "0.3.4" -target_info = "0.1.0" [dev-dependencies] regex = { workspace = true } diff --git a/common/lighthouse_version/src/lib.rs b/common/lighthouse_version/src/lib.rs index 238efd591a..c45dbac4d3 100644 --- a/common/lighthouse_version/src/lib.rs +++ b/common/lighthouse_version/src/lib.rs @@ -1,5 +1,5 @@ use git_version::git_version; -use target_info::Target; +use std::env::consts; /// Returns the current version of this build of Lighthouse. /// @@ -45,7 +45,7 @@ pub const COMMIT_PREFIX: &str = git_version!( /// /// `Lighthouse/v1.5.1-67da032+/x86_64-linux` pub fn version_with_platform() -> String { - format!("{}/{}-{}", VERSION, Target::arch(), Target::os()) + format!("{}/{}-{}", VERSION, consts::ARCH, consts::OS) } /// Returns semantic versioning information only.