Skip to content

Commit 69c2ee5

Browse files
authored
Merge pull request #207 from sksat/renovate/clap-3.x
fix(deps): update rust crate clap to v3
2 parents 8292a5c + 34d9a2f commit 69c2ee5

File tree

3 files changed

+29
-50
lines changed

3 files changed

+29
-50
lines changed

Cargo.lock

+18-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ anyhow = "1.0.52"
2727
actix-web = "4.0.0-beta.18"
2828
async-trait = "0.1.52"
2929
bytes = "1.1.0"
30-
clap = "2.34.0"
30+
clap = "3.0.0"
3131
cloudflare = "0.9.0"
3232
domain = { version = "0.6.1", features = ["master"] }
3333
env_logger = "0.9.0"

src/main.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,31 @@ async fn main() -> std::io::Result<()> {
5151
.author(env!("CARGO_PKG_AUTHORS"))
5252
.about(env!("CARGO_PKG_DESCRIPTION"))
5353
.arg(
54-
Arg::with_name("config")
55-
.short("c")
54+
Arg::new("config")
55+
.short('c')
5656
.long("config")
5757
.value_name("FILE")
5858
.default_value("./config.toml")
5959
.help("set config file")
6060
.takes_value(true),
6161
)
6262
.arg(
63-
Arg::with_name("debug")
63+
Arg::new("debug")
6464
.long("debug")
65-
.short("d")
65+
.short('d')
6666
.help("print debug information verbosely"),
6767
)
68-
.subcommand(clap::SubCommand::with_name("srv").about("start server"))
68+
.subcommand(clap::App::new("srv").about("start server"))
6969
.subcommand(
70-
clap::SubCommand::with_name("add")
70+
clap::App::new("add")
7171
.about("add kuso subdomain")
72-
.arg(Arg::with_name("subdomain").required(true).help("subdomain"))
73-
.arg(Arg::with_name("target").required(true).help("target URL")),
72+
.arg(Arg::new("subdomain").required(true).help("subdomain"))
73+
.arg(Arg::new("target").required(true).help("target URL")),
7474
)
7575
.subcommand(
76-
clap::SubCommand::with_name("delete")
76+
clap::App::new("delete")
7777
.about("delete kuso subdomain")
78-
.arg(Arg::with_name("subdomain").required(true).help("subdomain")),
78+
.arg(Arg::new("subdomain").required(true).help("subdomain")),
7979
)
8080
.get_matches();
8181

0 commit comments

Comments
 (0)