Skip to content

Commit

Permalink
build(deps): upgrade clap to version 4
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
mkroening committed Mar 5, 2024
1 parent 6b9a7b4 commit af288e1
Showing 7 changed files with 44 additions and 132 deletions.
154 changes: 35 additions & 119 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion edu-sync-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"] }
3 changes: 1 addition & 2 deletions edu-sync-cli/src/add.rs
Original file line number Diff line number Diff line change
@@ -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.
///
3 changes: 1 addition & 2 deletions edu-sync-cli/src/config.rs
Original file line number Diff line number Diff line change
@@ -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 {
3 changes: 1 addition & 2 deletions edu-sync-cli/src/fetch.rs
Original file line number Diff line number Diff line change
@@ -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 {
6 changes: 3 additions & 3 deletions edu-sync-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -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),
5 changes: 2 additions & 3 deletions edu-sync-cli/src/sync.rs
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit af288e1

Please sign in to comment.