diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2022-02-19 22:24:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-19 22:24:11 +0100 |
commit | e09b821c42c02035717326820083f6725ed1a83e (patch) | |
tree | 8046ea9063045d732c6d3ad6cc32815819a93a1d /src | |
parent | d09f71720e1fada98ac02431685e200dd0847b96 (diff) |
build: bump clap from 3.0.14 to 3.1.0 (#3630)
* build: bump clap from 3.0.14 to 3.1.0
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.14 to 3.1.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.14...clap_complete-v3.1.0)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* refactor(clap): fix deprecation warnings
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index a2dfad57f..fd0176630 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use clap::crate_authors; use std::io; use std::time::SystemTime; -use clap::{AppSettings, IntoApp, Parser, Subcommand}; +use clap::{IntoApp, Parser, Subcommand}; use clap_complete::{generate, Shell as CompletionShell}; use rand::distributions::Alphanumeric; use rand::Rng; @@ -22,9 +22,10 @@ fn long_version() -> &'static str { author=crate_authors!(), version=shadow::PKG_VERSION, long_version=long_version(), - about="The cross-shell prompt for astronauts. ☄🌌️" + about="The cross-shell prompt for astronauts. ☄🌌️", + subcommand_required=true, + arg_required_else_help=true, )] -#[clap(setting(AppSettings::SubcommandRequiredElseHelp))] struct Cli { #[clap(subcommand)] command: Commands, @@ -88,7 +89,7 @@ enum Commands { /// Generate random session key Session, /// Prints time in milliseconds - #[clap(setting=AppSettings::Hidden)] + #[clap(hide = true)] Time, /// Prints timings of all active modules Timings(Properties), @@ -206,7 +207,7 @@ fn main() { Commands::Timings(props) => print::timings(props), Commands::Completions { shell } => generate( shell, - &mut Cli::into_app(), + &mut Cli::command(), "starship", &mut io::stdout().lock(), ), |