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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 12 deletions

18
Cargo.lock generated
View File

@ -269,9 +269,9 @@ dependencies = [
[[package]]
name = "clap"
version = "3.0.14"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b63edc3f163b3c71ec8aa23f9bd6070f77edbf3d1d198b164afa90ff00e4ec62"
checksum = "e5f1fea81f183005ced9e59cdb01737ef2423956dac5a6d731b06b2ecfaa3467"
dependencies = [
"atty",
"bitflags",
@ -296,11 +296,11 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "3.0.0"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9"
checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72"
dependencies = [
"heck",
"heck 0.4.0",
"proc-macro-error",
"proc-macro2",
"quote",
@ -715,6 +715,12 @@ dependencies = [
"unicode-segmentation",
]
[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
[[package]]
name = "hermit-abi"
version = "0.1.19"
@ -1699,7 +1705,7 @@ version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb"
dependencies = [
"heck",
"heck 0.3.3",
"proc-macro2",
"quote",
"syn",

View File

@ -30,7 +30,7 @@ battery = ["starship-battery"]
ansi_term = "0.12.1"
byte-unit = "4.0.13"
chrono = "0.4.19"
clap = { version = "3.0.14", features = ["derive", "cargo", "unicode"] }
clap = { version = "3.1.0", features = ["derive", "cargo", "unicode"] }
clap_complete = "3.0.6"
directories-next = "2.0.0"
gethostname = "0.2.2"

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(),
),