mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
cli/terminal: clean up args::Error type
The other variants of `terminal::args::Error` were no longer used. The only variant required is `Error::WithHint`. The enum is also made private, since it is only used in this crate.
This commit is contained in:
committed by
Lorenz Leutgeb
parent
a75db6a695
commit
961301f643
@@ -1,6 +1,7 @@
|
||||
pub mod args;
|
||||
|
||||
pub use args::Error;
|
||||
pub(crate) use args::Error;
|
||||
|
||||
pub mod format;
|
||||
pub mod io;
|
||||
pub use io::signer;
|
||||
|
||||
@@ -5,16 +5,7 @@ use radicle::node::policy::Scope;
|
||||
use radicle::prelude::{Did, NodeId, RepoId};
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum Error {
|
||||
/// If this error is returned from argument parsing, help is displayed.
|
||||
#[error("help invoked")]
|
||||
Help,
|
||||
/// If this error is returned from argument parsing, the manual page is displayed.
|
||||
#[error("help manual invoked")]
|
||||
HelpManual { name: &'static str },
|
||||
/// If this error is returned from argument parsing, usage is displayed.
|
||||
#[error("usage invoked")]
|
||||
Usage,
|
||||
pub(crate) enum Error {
|
||||
/// An error with a hint.
|
||||
#[error("{err}")]
|
||||
WithHint {
|
||||
|
||||
Reference in New Issue
Block a user