radicle-node
It has always bugged me that we resort to anyhow for just a handful of
errors, really. It also turns out that we were holding lexopt wrong,
it features parse_with which neatly integrates with FromStr, and
luckily all our arguments implement that trait. This makes for cleaner
option parsing.
For now, the execution errors are all “transparent”, which shouldn’t be much of a regression, if at all.
radicle-term
As a library crate, it is bad to return such generic errors.
To get there, errors from inquire are downcasted.
This allowed to clean up the public interface of radicle-term, so that
it does also not leak the inquire::InquireError in its public API.
Notes
In both cases we touched parsing: For radicle-node it was about CLI options,
for radicle-term it was user input prompts.
radicle-node
It has always bugged me that we resort to anyhow for just a handful of
errors, really. It also turns out that we were holding lexopt wrong,
it features parse_with which neatly integrates with FromStr, and
luckily all our arguments implement that trait. This makes for cleaner
option parsing.
For now, the execution errors are all “transparent”, which shouldn’t be much of a regression, if at all.
radicle-term
As a library crate, it is bad to return such generic errors.
To get there, errors from inquire are downcasted.
This allowed to clean up the public interface of radicle-term, so that
it does also not leak the inquire::InquireError in its public API.
Notes
In both cases we touched parsing: For radicle-node it was about CLI options,
for radicle-term it was user input prompts.
Also tackle radicle-term.
Rebase
Changes:
- Rebase
- Use
ok_or_else - Reword commits
- Use
non_exhaustive