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>
This commit is contained in:
David Knaack
2022-02-19 22:24:11 +01:00
committed by GitHub
parent d09f71720e
commit e09b821c42
3 changed files with 19 additions and 12 deletions
+6 -5
View File
@@ -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(),
),