Skip to content

Commit

Permalink
Update clap to 3.0.0 final release
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Jan 1, 2022
1 parent 18fe15d commit f224aab
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ console = "0.15.0"
minijinja = "0.10.0"
lddtree = "0.2.0"
cc = "1.0.72"
clap = { version = "3.0.0-rc.7", features = ["derive", "env", "wrap_help"] }
clap_generate = "3.0.0-rc.7"
clap_generate_fig = "3.0.0-rc.7"
clap = { version = "3.0.0", features = ["derive", "env", "wrap_help"] }
clap_complete = "3.0.0"
clap_complete_fig = "3.0.0"

[dev-dependencies]
indoc = "1.0.3"
Expand Down
16 changes: 8 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use anyhow::{bail, Context, Result};
use clap::{ArgEnum, IntoApp, Parser};
use clap_generate::Generator;
use clap_complete::Generator;
use maturin::{
develop, init_project, new_project, write_dist_info, BridgeModel, BuildOptions,
GenerateProjectOptions, PathWriter, PlatformTag, PythonInterpreter, Target,
Expand Down Expand Up @@ -428,19 +428,19 @@ fn run() -> Result<()> {
match shell {
Shell::Fig => {
app.set_bin_name(env!("CARGO_BIN_NAME"));
let fig = clap_generate_fig::Fig;
let fig = clap_complete_fig::Fig;
fig.generate(&app, &mut io::stdout());
}
_ => {
let shell = match shell {
Shell::Bash => clap_generate::Shell::Bash,
Shell::Elvish => clap_generate::Shell::Elvish,
Shell::Fish => clap_generate::Shell::Fish,
Shell::PowerShell => clap_generate::Shell::PowerShell,
Shell::Zsh => clap_generate::Shell::Zsh,
Shell::Bash => clap_complete::Shell::Bash,
Shell::Elvish => clap_complete::Shell::Elvish,
Shell::Fish => clap_complete::Shell::Fish,
Shell::PowerShell => clap_complete::Shell::PowerShell,
Shell::Zsh => clap_complete::Shell::Zsh,
Shell::Fig => unreachable!(),
};
clap_generate::generate(
clap_complete::generate(
shell,
&mut app,
env!("CARGO_BIN_NAME"),
Expand Down

0 comments on commit f224aab

Please sign in to comment.