mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 07:55:42 +00:00
Update clap to version 4 (#6128)
* Move clap to 4.0.9
* Remove "deprecated" feature flag
* Convert to default_value_t
* update lockfile for {"substrate"}
* Add group(skip) to avoid naming conflict
* More group(skip)
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -17,6 +17,6 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master
|
||||
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
clap = { version = "3.1", features = ["derive"] }
|
||||
clap = { version = "4.0.9", features = ["derive"] }
|
||||
log = "0.4.17"
|
||||
tokio = { version = "1.19.2", features = ["macros"] }
|
||||
|
||||
@@ -16,18 +16,18 @@
|
||||
|
||||
//! Remote tests for bags-list pallet.
|
||||
|
||||
use clap::{ArgEnum, Parser};
|
||||
use clap::{Parser, ValueEnum};
|
||||
|
||||
#[derive(Clone, Debug, ArgEnum)]
|
||||
#[clap(rename_all = "PascalCase")]
|
||||
#[derive(Clone, Debug, ValueEnum)]
|
||||
#[value(rename_all = "PascalCase")]
|
||||
enum Command {
|
||||
CheckMigration,
|
||||
SanityCheck,
|
||||
Snapshot,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, ArgEnum)]
|
||||
#[clap(rename_all = "PascalCase")]
|
||||
#[derive(Clone, Debug, ValueEnum)]
|
||||
#[value(rename_all = "PascalCase")]
|
||||
enum Runtime {
|
||||
Polkadot,
|
||||
Kusama,
|
||||
@@ -36,13 +36,13 @@ enum Runtime {
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Cli {
|
||||
#[clap(long, short, default_value = "wss://kusama-rpc.polkadot.io:443")]
|
||||
#[arg(long, short, default_value = "wss://kusama-rpc.polkadot.io:443")]
|
||||
uri: String,
|
||||
#[clap(long, short, ignore_case = true, arg_enum, default_value = "kusama")]
|
||||
#[arg(long, short, ignore_case = true, value_enum, default_value_t = Runtime::Kusama)]
|
||||
runtime: Runtime,
|
||||
#[clap(long, short, ignore_case = true, arg_enum, default_value = "SanityCheck")]
|
||||
#[arg(long, short, ignore_case = true, value_enum, default_value_t = Command::SanityCheck)]
|
||||
command: Command,
|
||||
#[clap(long, short)]
|
||||
#[arg(long, short)]
|
||||
snapshot_limit: Option<usize>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user