Skip to content

Commit

Permalink
Fix --help in clap
Browse files Browse the repository at this point in the history
This functionality was broken by "f38363d - Switch to 2021 edition of
Rust", or more specifically with the change to resolver = 2.

The `--help` flag requires a feature in clap to be enabled, which is either a newly introduced requirement, or the feature(s) were somehow included implicitly when using resolver = 1.
  • Loading branch information
argerus authored and erikbosch committed Apr 8, 2024
1 parent 7b2d798 commit 3620617
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions databroker-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ clap = { workspace = true, features = [
"std",
"env",
"derive",
"help",
"error-context",
"usage",
] }
regex = "1.6.0"
http = "0.2.8"
Expand Down
4 changes: 3 additions & 1 deletion databroker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ tracing-subscriber = { version = "0.3.11", default-features = false, features =
clap = { workspace = true, features = [
"std",
"env",
"derive",
"help",
"usage",
"error-context",
] }
sqlparser = "0.16.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
5 changes: 2 additions & 3 deletions databroker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ async fn read_metadata_file<'a, 'b>(

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let version = option_env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")
.unwrap_or(option_env!("VERGEN_GIT_SHA").unwrap_or("unknown"));
let version = option_env!("CARGO_PKG_VERSION").unwrap_or_default();

let about = format!(
concat!(
Expand All @@ -190,7 +189,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
option_env!("VERGEN_CARGO_DEBUG").unwrap_or(""),
);

let mut parser = Command::new("Kuksa Data Broker");
let mut parser = Command::new("Kuksa Databroker");
parser = parser
.version(version)
.about(about)
Expand Down

0 comments on commit 3620617

Please sign in to comment.