Skip to content

Argument --length silently takes precedence over --bytes. #105

@eth-p

Description

@eth-p

When specifying both --length and --bytes in either long or short form, the value of --length will be chosen while the value specified by --bytes will be discarded silently. While I don't think anybody would intentionally run into it, having a warning or error just in case is something that would help improve UX.

hexyl/src/bin/hexyl.rs

Lines 174 to 176 in cc5b308

let mut reader = if let Some(length) = matches
.value_of("length")
.or_else(|| matches.value_of("bytes"))


Note: I'm doing a class assignment regarding creating tests (from scratch) for an open-source command line program, and I chose hexyl for it. You might have a couple more of these on the way, depending on what the assignment brings to light :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions