Update clap to stable version
This commit is contained in:
parent
30bd3d6a37
commit
541894f4df
3 changed files with 24 additions and 48 deletions
49
Cargo.lock
generated
49
Cargo.lock
generated
|
@ -497,9 +497,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "3.0.0-beta.2"
|
||||
version = "3.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142"
|
||||
checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"clap_derive",
|
||||
|
@ -507,15 +507,13 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"os_str_bytes",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
"vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "3.0.0-beta.2"
|
||||
version = "3.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1"
|
||||
checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro-error",
|
||||
|
@ -1120,12 +1118,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.2"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
|
@ -1812,9 +1807,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "os_str_bytes"
|
||||
version = "2.4.0"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85"
|
||||
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-scale-codec"
|
||||
|
@ -2959,12 +2957,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.12.1"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
|
@ -3242,18 +3237,6 @@ dependencies = [
|
|||
"tinyvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.1"
|
||||
|
@ -3305,12 +3288,6 @@ version = "0.2.15"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.3"
|
||||
|
|
|
@ -24,8 +24,7 @@ base64 = "0.13.0"
|
|||
# Used for working with dates
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
# Used to build admin CLI tool
|
||||
# Versions greater than beta.2 require Rust 1.54
|
||||
clap = { version = "3.0.0-beta.2", default-features = false, features = ["std", "derive"] }
|
||||
clap = { version = "3.1.8", default-features = false, features = ["std", "derive"] }
|
||||
# Used for pooling database connections
|
||||
deadpool = "0.9.2"
|
||||
deadpool-postgres = { version = "0.10.2", default-features = false }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use chrono::{Duration, Utc};
|
||||
use clap::Clap;
|
||||
use clap::Parser;
|
||||
use uuid::Uuid;
|
||||
|
||||
use mitra::config;
|
||||
|
@ -17,13 +17,13 @@ use mitra::models::users::queries::{
|
|||
use mitra::utils::crypto::{generate_private_key, serialize_private_key};
|
||||
|
||||
/// Admin CLI tool
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct Opts {
|
||||
#[clap(subcommand)]
|
||||
subcmd: SubCommand,
|
||||
}
|
||||
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
enum SubCommand {
|
||||
GenerateRsaKey(GenerateRsaKey),
|
||||
GenerateEthereumAddress(GenerateEthereumAddress),
|
||||
|
@ -36,7 +36,7 @@ enum SubCommand {
|
|||
}
|
||||
|
||||
/// Generate RSA private key
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct GenerateRsaKey;
|
||||
|
||||
impl GenerateRsaKey {
|
||||
|
@ -48,33 +48,33 @@ impl GenerateRsaKey {
|
|||
}
|
||||
|
||||
/// Generate ethereum address
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct GenerateEthereumAddress;
|
||||
|
||||
/// Generate invite code
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct GenerateInviteCode;
|
||||
|
||||
/// List invite codes
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct ListInviteCodes;
|
||||
|
||||
/// Delete profile
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct DeleteProfile {
|
||||
#[clap(short)]
|
||||
id: Uuid,
|
||||
}
|
||||
|
||||
/// Delete post
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct DeletePost {
|
||||
#[clap(short)]
|
||||
id: Uuid,
|
||||
}
|
||||
|
||||
/// Delete old remote posts
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
struct DeleteExtraneousPosts {
|
||||
#[clap(short)]
|
||||
days: i64,
|
||||
|
|
Loading…
Reference in a new issue