Skip to content

Fix clap deprecation warning#17

Merged
edfloreshz merged 1 commit intoedfloreshz:mainfrom
Kedap:clap-settings
May 22, 2022
Merged

Fix clap deprecation warning#17
edfloreshz merged 1 commit intoedfloreshz:mainfrom
Kedap:clap-settings

Conversation

@Kedap
Copy link
Contributor

@Kedap Kedap commented May 22, 2022

When it was compiling I got:

warning: use of deprecated variant `clap::AppSettings::ArgRequiredElseHelp`: Replaced with `Command::arg_required_else_help` and `Command::is_arg_required_else_help_set`
  --> src/cli.rs:21:29
   |
21 | #[clap(setting(AppSettings::ArgRequiredElseHelp))]
   |                             ^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: `devmode` (bin "dm") generated 1 warning

This is because ArgRequiredElseHelp is deprecated as it says in the warning. As a solution, arg_required_else_help is used.

PS: Rustfmt was also applied

@edfloreshz edfloreshz merged commit c5e763e into edfloreshz:main May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants