Skip to content

Commit

Permalink
another buggy release
Browse files Browse the repository at this point in the history
  • Loading branch information
spezifisch committed Jul 26, 2024
1 parent 283f8b7 commit 9764e72
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,21 @@ struct Opts {
count: Option<u64>,
}

fn long_version() -> &'static str {
const LONG_VERSION: &str = {
let commit_hash = option_env!("VERGEN_GIT_SHA").unwrap_or("unknown");
let build_timestamp = option_env!("VERGEN_BUILD_TIMESTAMP").unwrap_or("unknown");
let rust_version = option_env!("VERGEN_RUSTC_SEMVER").unwrap_or("unknown");

concat!(
"ifstat-rs: A tool to report network interface statistics.\n\n",
"Built with Rust.\n\n",
"Build info:\n",
"Commit: ", commit_hash, "\n",
"Build Timestamp: ", build_timestamp, "\n",
"Rust Version: ", rust_version, "\n",
"Repo: https://github.com/spezifisch/ifstat-rs"
)
};
LONG_VERSION
fn long_version() -> String {
let commit_hash = option_env!("VERGEN_GIT_SHA").unwrap_or("unknown");
let build_timestamp = option_env!("VERGEN_BUILD_TIMESTAMP").unwrap_or("unknown");
let rust_version = option_env!("VERGEN_RUSTC_SEMVER").unwrap_or("unknown");

format!(
"ifstat-rs: A tool to report network interface statistics.\n\n\
Built with Rust.\n\n\
Build info:\n\
Commit: {}\n\
Build Timestamp: {}\n\
Rust Version: {}\n\
Repo: https://github.com/spezifisch/ifstat-rs",
commit_hash, build_timestamp, rust_version
)
}

#[tokio::main]
Expand Down

0 comments on commit 9764e72

Please sign in to comment.