Skip to content

cksum: Use clap's usize parser and default_value("0") #11315

@oech3

Description

@oech3

Currently, cksum's length is managed by Option:

fn with_length(self) -> Self {
self.arg(
Arg::new(options::LENGTH)
.long(options::LENGTH)
.short('l')
.help(translate!("ck-common-help-length"))
.action(ArgAction::Set),
)
}

But cksum -l 0 is supported for alias for default value. So Some() is unnecessary if clap provided defaukt value with usize parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions