Skip to content

Commit

Permalink
Bump clap from 3.2.25 to 4.5.16 (#615)
Browse files Browse the repository at this point in the history
* Bump clap from 3.2.25 to 4.5.16

Bumps [clap](https://github.com/clap-rs/clap) from 3.2.25 to 4.5.16.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v3.2.25...clap_complete-v4.5.16)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luís Lizardo <[email protected]>
  • Loading branch information
dependabot[bot] and lizardoluis authored Aug 29, 2024
1 parent 0b07557 commit 746c73c
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 71 deletions.
132 changes: 78 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ base64 = "0.22.1"
bytes = "1.4.0"
chrono = { version = "0.4", default-features = false }
clade = { path = "clade" }
clap = { version = "3.2.19", features = [ "derive" ] }
clap = { version = "4.5.16", features = [ "derive" ] }
config = "0.14.0"

# PG wire protocol support
Expand Down
22 changes: 6 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![feature(let_chains)]

use clap::AppSettings::NoAutoVersion;
use seafowl::config::context::setup_metrics;
use tokio::select;

Expand Down Expand Up @@ -39,30 +38,21 @@ use seafowl::frontend::postgres::run_pg_server;
const DEFAULT_CONFIG_PATH: &str = "seafowl.toml";

#[derive(Debug, Parser)]
#[clap(name = "seafowl", global_settings = &[NoAutoVersion])]
#[command(name = "seafowl", disable_version_flag = true)]
struct Args {
#[clap(short, long, default_value=DEFAULT_CONFIG_PATH)]
#[arg(short, long, default_value=DEFAULT_CONFIG_PATH)]
config_path: PathBuf,

#[clap(
short = 'V',
long = "--version",
help = "Print version information",
takes_value = false
)]
#[arg(short = 'V', long = "version", help = "Print version information")]
version: bool,

#[clap(short, long, help = "Run a one-off command and exit")]
#[arg(short, long, help = "Run a one-off command and exit")]
one_off: Option<String>,

#[clap(
long,
help = "Run commands interactively from a CLI",
takes_value = false
)]
#[arg(long, help = "Run commands interactively from a CLI")]
cli: bool,

#[clap(long, help = "Enable JSON logging", takes_value = false)]
#[arg(long, help = "Enable JSON logging")]
json_logs: bool,
}

Expand Down

0 comments on commit 746c73c

Please sign in to comment.