From af288e11a92be275a123e493ddb01058e7bd78ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 5 Mar 2024 21:42:34 +0100 Subject: [PATCH] build(deps): upgrade clap to version 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- Cargo.lock | 154 +++++++++---------------------------- edu-sync-cli/Cargo.toml | 2 +- edu-sync-cli/src/add.rs | 3 +- edu-sync-cli/src/config.rs | 3 +- edu-sync-cli/src/fetch.rs | 3 +- edu-sync-cli/src/main.rs | 6 +- edu-sync-cli/src/sync.rs | 5 +- 7 files changed, 44 insertions(+), 132 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e1c1ad..7734ac0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,17 +95,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -190,42 +179,43 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ - "atty", - "bitflags 1.3.2", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "3.2.25" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -282,8 +272,8 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.52", + "strsim 0.10.0", + "syn", ] [[package]] @@ -294,7 +284,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -402,7 +392,7 @@ version = "0.1.2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -521,7 +511,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -607,15 +597,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -932,7 +913,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -974,12 +955,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -1016,30 +991,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" version = "1.0.78" @@ -1278,7 +1229,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -1300,7 +1251,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -1351,7 +1302,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -1392,15 +1343,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "syn" -version = "1.0.109" +name = "strsim" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "syn" @@ -1452,21 +1398,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" - [[package]] name = "thiserror" version = "1.0.57" @@ -1484,7 +1415,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -1558,7 +1489,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", ] [[package]] @@ -1716,12 +1647,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - [[package]] name = "want" version = "0.3.1" @@ -1758,7 +1683,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn", "wasm-bindgen-shared", ] @@ -1792,7 +1717,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1848,15 +1773,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/edu-sync-cli/Cargo.toml b/edu-sync-cli/Cargo.toml index 8cbd055..19971f9 100644 --- a/edu-sync-cli/Cargo.toml +++ b/edu-sync-cli/Cargo.toml @@ -13,7 +13,7 @@ categories = ["command-line-utilities"] edu-sync = { path = "../edu-sync" } anyhow = "1.0" -clap = { version = "3", features = ["derive"] } +clap = { version = "4", features = ["derive"] } dialoguer = "0.11" env_logger = "0.11" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } diff --git a/edu-sync-cli/src/add.rs b/edu-sync-cli/src/add.rs index 2f9b996..84222e0 100644 --- a/edu-sync-cli/src/add.rs +++ b/edu-sync-cli/src/add.rs @@ -1,6 +1,5 @@ use std::path::PathBuf; -use clap::StructOpt; use dialoguer::Password; use edu_sync::{ account::Account, @@ -10,7 +9,7 @@ use tokio::task; use url::Url; /// Adds a new account to the configuration. -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Parser)] pub struct Subcommand { /// The username of the account. /// diff --git a/edu-sync-cli/src/config.rs b/edu-sync-cli/src/config.rs index 0bc0c50..3241f59 100644 --- a/edu-sync-cli/src/config.rs +++ b/edu-sync-cli/src/config.rs @@ -1,8 +1,7 @@ -use clap::StructOpt; use edu_sync::config::Config; /// Prints the path of the configuration file. -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Parser)] pub struct Subcommand {} impl Subcommand { diff --git a/edu-sync-cli/src/fetch.rs b/edu-sync-cli/src/fetch.rs index 49989bc..66af1f8 100644 --- a/edu-sync-cli/src/fetch.rs +++ b/edu-sync-cli/src/fetch.rs @@ -1,10 +1,9 @@ -use clap::StructOpt; use edu_sync::{account::Account, config::Config}; use crate::util; /// Updates the available courses in the configuration. -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Parser)] pub struct Subcommand {} impl Subcommand { diff --git a/edu-sync-cli/src/main.rs b/edu-sync-cli/src/main.rs index 6edbc56..5f089aa 100644 --- a/edu-sync-cli/src/main.rs +++ b/edu-sync-cli/src/main.rs @@ -12,11 +12,11 @@ mod fetch; mod sync; mod util; -use clap::StructOpt; +use clap::Parser; use human_panic::setup_panic; -#[derive(Debug, StructOpt)] -#[structopt(name = "Edu Sync", author, about)] +#[derive(Debug, clap::Parser)] +#[clap(name = "Edu Sync", author, about)] enum Subcommand { Add(add::Subcommand), Config(config::Subcommand), diff --git a/edu-sync-cli/src/sync.rs b/edu-sync-cli/src/sync.rs index 4fe6b95..5fac33e 100644 --- a/edu-sync-cli/src/sync.rs +++ b/edu-sync-cli/src/sync.rs @@ -9,7 +9,6 @@ use std::{ time::Duration, }; -use clap::StructOpt; use dialoguer::{ console::{self, Alignment}, Confirm, @@ -31,11 +30,11 @@ use tokio::{task, time}; use crate::util; /// Synchronizes available content from the configured courses. -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Parser)] pub struct Subcommand { /// Bypass any and all “Are you sure?” messages. It’s not a good idea to do /// this unless you want to run edu-sync-cli from a script. - #[structopt(long)] + #[clap(long)] no_confirm: bool, }