Skip to content

Commit

Permalink
main: print version on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
hch12907 committed Nov 19, 2023
1 parent fb0fb9b commit c62d5f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ureq = ["dep:ureq"]
regex = ["dep:regex"]

[dependencies]
curl = { version = "0.4.44", optional = true }
curl = { version = "^0.4.44", optional = true }
data-encoding = "^2.4.0"
libc = "^0.2.150"
regex = { version = "^1.10.2", optional = true }
Expand Down
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ fn main() {

let update_rate = config.general.update_rate;

println!("dynners v{} started, updating every {} second(s)",
env!("CARGO_PKG_VERSION"),
update_rate.map(|x| u32::from(x)).unwrap_or(0)
);

// It's safe to unwrap here - the program is single-threaded and USER_AGENT
// is never initialized before reaching this point of program.
GENERAL_CONFIG.set(config.general).unwrap();
Expand Down

0 comments on commit c62d5f9

Please sign in to comment.