diff --git a/Cargo.lock b/Cargo.lock index 33cc8b156e..50a480581a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1036,12 +1036,6 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" -[[package]] -name = "const-str" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca749d3d3f5b87a0d6100509879f9cf486ab510803a4a4e1001da1ff61c2bd6" - [[package]] name = "convert_case" version = "0.4.0" @@ -4963,7 +4957,6 @@ dependencies = [ "clap 4.1.8", "comfy-table", "confy", - "const-str", "crossterm", "dirs-next", "eyre", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 1a2fc95912..7009807f75 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -85,7 +85,6 @@ hex = "0.4" thiserror = { workspace = true } pretty_assertions = "1.3.0" humantime = "2.1.0" -const-str = "0.5.6" [features] jemalloc = ["dep:jemallocator", "dep:jemalloc-ctl"] diff --git a/bin/reth/src/version.rs b/bin/reth/src/version.rs index 783397f2cd..a016d209c9 100644 --- a/bin/reth/src/version.rs +++ b/bin/reth/src/version.rs @@ -28,7 +28,7 @@ pub(crate) const SHORT_VERSION: &str = /// Build Timestamp: 2023-05-19T01:47:19.815651705Z /// Build Features: jemalloc /// ``` -pub(crate) const LONG_VERSION: &str = const_str::concat!( +pub(crate) const LONG_VERSION: &str = concat!( "Version: ", env!("CARGO_PKG_VERSION"), "\n", @@ -39,10 +39,7 @@ pub(crate) const LONG_VERSION: &str = const_str::concat!( env!("VERGEN_BUILD_TIMESTAMP"), "\n", "Build Features: ", - env!("VERGEN_CARGO_FEATURES"), - "\n", - "Build Profile: ", - build_profile_name() + env!("VERGEN_CARGO_FEATURES") ); /// The version information for reth formatted for P2P (devp2p). @@ -79,12 +76,6 @@ pub fn default_extradata() -> String { format!("reth/v{}/{}", env!("CARGO_PKG_VERSION"), std::env::consts::OS) } -const fn build_profile_name() -> &'static str { - // Nice hack from https://stackoverflow.com/questions/73595435/how-to-get-profile-from-cargo-toml-in-build-rs-or-at-runtime - let out_dir_path = const_str::split!(env!("OUT_DIR"), std::path::MAIN_SEPARATOR_STR); - out_dir_path[out_dir_path.len() - 4] -} - #[cfg(test)] mod tests { use super::*;