Skip to content

Commit

Permalink
chore: upgrade clap from 3.2 to 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Mar 20, 2023
1 parent b958386 commit 29edcdd
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 88 deletions.
118 changes: 54 additions & 64 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ name = "plantuml-generator"

[dependencies]
chrono = "0.4"
clap_complete = "3.2"
clap = { version = "3.2", features = ["env", "cargo"] }
clap_complete = "4.1"
clap = { version = "4.1", features = ["env", "cargo"] }
env_logger = { version = "0.10.0", default_features = false }
glob = "0.3"
heck = "0.4"
Expand Down
11 changes: 4 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
{
let app = build_cli();
let mut app = build_cli();

let app_matches = match app.clone().try_get_matches_from(args) {
Ok(app_matches) => app_matches,
Expand Down Expand Up @@ -55,8 +55,7 @@ where
}
_ => {
log::warn!("the SUBCOMMAND is missing");
app.clone()
.write_help(&mut io::stderr())
app.write_help(&mut io::stderr())
.expect("unable to write help message");
eprintln!();
2
Expand All @@ -74,8 +73,7 @@ where
}
_ => {
log::warn!("the SUBCOMMAND is missing");
app.clone()
.write_help(&mut io::stderr())
app.write_help(&mut io::stderr())
.expect("unable to write help message");
eprintln!();
2
Expand All @@ -96,8 +94,7 @@ where
}
_ => {
log::warn!("the SUBCOMMAND is missing");
app.clone()
.write_help(&mut io::stderr())
app.write_help(&mut io::stderr())
.expect("unable to write help message");
eprintln!();
2
Expand Down
Loading

0 comments on commit 29edcdd

Please sign in to comment.