update clap

This commit is contained in:
Mylloon 2022-10-18 16:32:51 +02:00
parent c001bf3cb2
commit 4298cdcd4b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 13 additions and 21 deletions

20
Cargo.lock generated
View file

@ -63,26 +63,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
version = "3.2.17"
version = "4.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29e724a68d9319343bb3328c9cc2dfde263f4b3142ee1059a9980580171c954b"
checksum = "06badb543e734a2d6568e19a40af66ed5364360b9226184926f89d229b4b4267"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
"once_cell",
"strsim",
"termcolor",
"textwrap",
]
[[package]]
name = "clap_derive"
version = "3.2.17"
version = "4.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13547f7012c01ab4a0e8f8967730ada8f9fdf419e8b6c792788f39cf4e46eefa"
checksum = "c42f169caba89a7d512b5418b09864543eeb4d497416c917d7137863bd2076ad"
dependencies = [
"heck",
"proc-macro-error",
@ -93,9 +91,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "0.2.4"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
dependencies = [
"os_str_bytes",
]
@ -1284,12 +1282,6 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "textwrap"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
[[package]]
name = "thin-slice"
version = "0.1.1"

View file

@ -4,7 +4,7 @@ version = "0.3.0"
edition = "2021"
[dependencies]
clap = { version = "3.2", features = ["derive"] }
clap = { version = "4.0.17", features = ["derive"] }
reqwest = { version = "0.11" }
tokio = { version = ">=1.13.1", features = ["full"] }
scraper = "0.13"

View file

@ -4,18 +4,18 @@ mod download;
mod parse;
#[derive(Parser)]
#[clap(version, about, long_about = None)]
#[command(version, about, long_about = None)]
struct Cli {
/// Your username
#[clap(value_parser)]
#[arg(value_parser)]
username: String,
/// Directory output [default: the username]
#[clap(short, long, value_parser, value_name = "DIRECTORY")]
#[arg(short, long, value_parser, value_name = "DIRECTORY")]
directory: Option<String>,
/// Domain name
#[clap(
#[arg(
long,
value_parser,
value_name = "DOMAIN NAME",
@ -24,11 +24,11 @@ struct Cli {
domain: String,
/// Scheme: HTTP/HTTPS
#[clap(long, value_parser, default_value = "https")]
#[arg(long, value_parser, default_value = "https")]
scheme: String,
/// Download special files
#[clap(short, takes_value = false)]
#[arg(short, action = clap::ArgAction::SetTrue)]
special_files: bool,
}