Skip to content

Commit

Permalink
Resolve clap deprecations
Browse files Browse the repository at this point in the history
    warning: use of deprecated variant `clap::AppSettings::DontCollapseArgsInUsage`: Replaced with `Command::dont_collapse_args_in_usage` and `Command::is_dont_collapse_args_in_usage_set`
      --> src/opts.rs:16:32
       |
    16 |         setting = AppSettings::DontCollapseArgsInUsage
       |                                ^^^^^^^^^^^^^^^^^^^^^^^

    warning: use of deprecated associated function `clap::CommandFactory::into_app`: Replaced with `CommandFactory::command
       --> src/opts.rs:168:30
        |
    168 |     <Opts as clap::IntoApp>::into_app().debug_assert();
        |                              ^^^^^^^^
  • Loading branch information
dtolnay committed Feb 17, 2022
1 parent 21ba22c commit 05311bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum Opts {
version,
author,
setting = AppSettings::DeriveDisplayOrder,
setting = AppSettings::DontCollapseArgsInUsage
dont_collapse_args_in_usage = true
)]
Expand(Args),
}
Expand Down Expand Up @@ -165,5 +165,5 @@ fn parse_selector(s: &str) -> Result<Selector, <Selector as FromStr>::Err> {

#[test]
fn test_cli() {
<Opts as clap::IntoApp>::into_app().debug_assert();
<Opts as clap::CommandFactory>::command().debug_assert();
}

0 comments on commit 05311bf

Please sign in to comment.