Skip to content

Commit d31c6a3

Browse files
authored
Merge pull request #24 from epage/v4
refactor: Upgrade to clap v4
2 parents 349e67a + 14d8400 commit d31c6a3

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

Cargo.lock

Lines changed: 8 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ serde_json = "1.0"
3939
schemars = { version = "0.8.8", features = ["preserve_order"] }
4040
toml = "0.5"
4141
assert_cmd = "2.0"
42-
clap = { version = "3.2", features = ["derive"] }
42+
clap = { version = "4.0", features = ["derive"] }
4343
proc-exit = "1.0"

src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ use clap::Parser;
44
use proc_exit::WithCodeResultExt;
55

66
#[derive(Parser)]
7-
#[clap(about, author, version)]
8-
#[clap(group = clap::ArgGroup::new("mode").multiple(false))]
7+
#[command(about, author, version)]
8+
#[command(group = clap::ArgGroup::new("mode").multiple(false))]
99
struct Args {
10-
#[clap(short, long, parse(from_os_str), group = "mode")]
10+
#[arg(short, long, group = "mode")]
1111
input: Option<std::path::PathBuf>,
12-
#[clap(short, long, parse(from_os_str))]
12+
#[arg(short)]
1313
output: Option<std::path::PathBuf>,
1414
/// Sleep between commits
15-
#[clap(long, parse(try_from_str))]
15+
#[arg(long)]
1616
sleep: Option<humantime::Duration>,
1717

18-
#[clap(short, long, parse(from_os_str), group = "mode")]
18+
#[arg(short, group = "mode")]
1919
schema: Option<std::path::PathBuf>,
2020
}
2121

0 commit comments

Comments
 (0)