refactor: clean up arguments

This commit is contained in:
ErrorNoInternet 2024-02-09 17:36:49 +08:00
parent a95a25dc1d
commit 428948e120
No known key found for this signature in database
GPG Key ID: 2486BFB7B1E6A4A3
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ use clap_complete::{generate, Generator, Shell};
use std::io; use std::io;
/// Generate shell completions /// Generate shell completions
#[derive(clap::Parser, Debug)] #[derive(Parser, Debug)]
pub struct Cli { pub struct Cli {
shell: Shell, shell: Shell,
} }

View File

@ -113,7 +113,7 @@ pub struct Cli {
mode: Mode, mode: Mode,
/// Check (fsck) the filesystem first /// Check (fsck) the filesystem first
#[arg(short, long, default_value_t=false)] #[arg(short, long)]
fsck: bool, fsck: bool,
/// Force color on/off. Default: autodetect tty /// Force color on/off. Default: autodetect tty

View File

@ -25,7 +25,7 @@ enum Subcommands {
#[command(allow_missing_positional = true)] #[command(allow_missing_positional = true)]
Snapshot { Snapshot {
/// Make snapshot read only /// Make snapshot read only
#[arg(long, short = 'r')] #[arg(long, short)]
read_only: bool, read_only: bool,
source: Option<PathBuf>, source: Option<PathBuf>,
dest: PathBuf dest: PathBuf