diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index cc1bb78..bdaf13a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ use std::{ }; use anyhow::{anyhow, bail, Context, Result}; -use clap::Clap; +use clap::Parser; use evtclib::{Compression, Encounter, Log}; use log::{debug, error, info, warn}; use notify::{self, DebouncedEvent, RecursiveMode, Watcher}; @@ -31,7 +31,7 @@ const DPS_REPORT_API: &str = "https://dps.report/uploadContent"; const WATCH_DELAY_SECONDS: u64 = 2; const RETRY_DELAY: Duration = Duration::from_secs(5); -#[derive(Clap, Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Parser, Debug, Clone, PartialEq, Eq, Hash)] #[clap(version = "0.1")] struct Opts { /// The configuration file path. @@ -41,7 +41,7 @@ struct Opts { subcmd: SubCommand, } -#[derive(Clap, Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Parser, Debug, Clone, PartialEq, Eq, Hash)] enum SubCommand { Watch(Watch), Upload(Upload), @@ -50,14 +50,14 @@ enum SubCommand { /// Use the watch mode to automatically handle new logs. /// /// This watches the given directory for new files and then zips and uploads them. -#[derive(Clap, Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Parser, Debug, Clone, PartialEq, Eq, Hash)] struct Watch { /// The directory to watch. dirname: PathBuf, } /// Upload a single log, as it would be done by the automatic watcher. -#[derive(Clap, Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Parser, Debug, Clone, PartialEq, Eq, Hash)] struct Upload { /// The log to upload. path: PathBuf, |