cli/terminal: remove Help struct

The `Help` struct is no longer needed thanks to `clap`, so it is removed.
This commit is contained in:
Fintan Halpenny
2025-11-01 11:20:43 +01:00
committed by Lorenz Leutgeb
parent e359435040
commit fec8a27a36
2 changed files with 1 additions and 16 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
pub mod args;
pub use args::{Args, Error, Help};
pub use args::{Args, Error};
pub mod format;
pub mod io;
pub use io::signer;
-15
View File
@@ -15,7 +15,6 @@ use radicle::node::{Address, Alias};
use radicle::prelude::{Did, NodeId, RepoId};
use crate::git::Rev;
use crate::terminal as term;
#[derive(thiserror::Error, Debug)]
pub enum Error {
@@ -36,20 +35,6 @@ pub enum Error {
},
}
pub struct Help {
pub name: &'static str,
pub description: &'static str,
pub version: &'static str,
pub usage: &'static str,
}
impl Help {
/// Print help to stdout.
pub fn print(&self) {
term::help(self.name, self.version, self.description, self.usage);
}
}
pub trait Args: Sized {
fn from_env() -> anyhow::Result<Self> {
let args: Vec<_> = std::env::args_os().skip(1).collect();