diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-10-02 10:50:35 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-10-23 09:38:00 +0300 |
commit | 5522e9c40a6b2beb1cfea51e90351b90fada5931 (patch) | |
tree | 201e4f57bf4d3240b02d5b34856c4bdbff8f1860 /src/cmd/backup.rs | |
parent | 1baa17c93e6cccd6194592076210625364058615 (diff) | |
download | obnam2-5522e9c40a6b2beb1cfea51e90351b90fada5931.tar.gz |
refactor: use clap instead of structopt
clap version 3 basically replaces structopt entirely.
Sponsored-by: author
Diffstat (limited to 'src/cmd/backup.rs')
-rw-r--r-- | src/cmd/backup.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/backup.rs b/src/cmd/backup.rs index 80dbb1f..a18027b 100644 --- a/src/cmd/backup.rs +++ b/src/cmd/backup.rs @@ -10,21 +10,21 @@ use crate::generation::GenId; use crate::performance::{Clock, Performance}; use crate::schema::VersionComponent; +use clap::Parser; use log::info; use std::time::SystemTime; -use structopt::StructOpt; use tempfile::tempdir; use tokio::runtime::Runtime; /// Make a backup. -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] pub struct Backup { /// Force a full backup, instead of an incremental one. - #[structopt(long)] + #[clap(long)] full: bool, /// Backup schema major version to use. - #[structopt(long)] + #[clap(long)] backup_version: Option<VersionComponent>, } |