cli: use default_value_t to accept typed values for CLI flags

This commit is contained in:
Vincent Ging Ho Yim
2026-06-22 18:03:09 +10:00
committed by Austin Seipp
parent c96e600fc0
commit 805a3134a7
3 changed files with 3 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ pub(crate) struct BisectRunArgs {
/// The interpretation of exit statuses will be inverted (excluding special
/// exit statuses), so status 0 means bad and other non-zero statuses mean
/// good.
#[arg(long, value_name = "TARGET", default_value = "false")]
#[arg(long, value_name = "TARGET", default_value_t = false)]
find_good: bool,
}

View File

@@ -52,7 +52,7 @@ use crate::ui::Ui;
pub(crate) struct NextArgs {
/// How many revisions to move forward. Advances to the next child by
/// default
#[arg(default_value = "1")]
#[arg(default_value_t = 1)]
offset: u64,
/// Instead of creating a new working-copy commit on top of the target

View File

@@ -50,7 +50,7 @@ use crate::ui::Ui;
#[command(verbatim_doc_comment)]
pub(crate) struct PrevArgs {
/// How many revisions to move backward. Moves to the parent by default
#[arg(default_value = "1")]
#[arg(default_value_t = 1)]
offset: u64,
/// Edit the parent directly, instead of moving the working-copy commit