build: bump clap from v3 to v4 (#4413)

* build: bump clap from v3 to v4

* bump
This commit is contained in:
David Knaack
2022-09-29 23:51:56 +02:00
committed by GitHub
parent 20b4bf156b
commit c5bffb5620
4 changed files with 16 additions and 26 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ use std::io;
use std::thread::available_parallelism;
use std::time::SystemTime;
use clap::{IntoApp, Parser, Subcommand};
use clap::{CommandFactory, Parser, Subcommand};
use clap_complete::{generate, Shell as CompletionShell};
use rand::distributions::Alphanumeric;
use rand::Rng;
@@ -33,7 +33,7 @@ enum Commands {
BugReport,
/// Generate starship shell completions for your shell to stdout
Completions {
#[clap(arg_enum)]
#[clap(value_enum)]
shell: CompletionShell,
},
/// Edit the starship configuration
+2 -2
View File
@@ -1,4 +1,4 @@
use clap::{PossibleValue, ValueEnum};
use clap::{builder::PossibleValue, ValueEnum};
use nu_ansi_term::AnsiStrings;
use rayon::prelude::*;
use std::collections::BTreeSet;
@@ -460,7 +460,7 @@ impl ValueEnum for Preset {
shadow::get_preset_list()
}
fn to_possible_value<'a>(&self) -> Option<clap::PossibleValue<'a>> {
fn to_possible_value(&self) -> Option<PossibleValue> {
Some(PossibleValue::new(self.0))
}
}