mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-22 02:50:45 +08:00
bin: Remove obsolete argument parsing from help command
This commit is contained in:
+1
-19
@@ -21,25 +21,7 @@ const COMMANDS: &[Help] = &[tui_help::HELP];
|
||||
pub struct Options {}
|
||||
|
||||
impl Args for Options {
|
||||
fn from_args(args: Vec<OsString>) -> anyhow::Result<(Self, Vec<OsString>)> {
|
||||
use lexopt::prelude::*;
|
||||
|
||||
let mut parser = lexopt::Parser::from_args(args);
|
||||
let mut forward = true;
|
||||
|
||||
while let Some(arg) = parser.next()? {
|
||||
match arg {
|
||||
Long("no-forward") => {
|
||||
forward = false;
|
||||
}
|
||||
_ => {
|
||||
if !forward {
|
||||
return Err(Error::HelpManual { name: "rad-tui" }.into());
|
||||
}
|
||||
return Err(anyhow::anyhow!(arg.unexpected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
fn from_args(_args: Vec<OsString>) -> anyhow::Result<(Self, Vec<OsString>)> {
|
||||
Err(Error::HelpManual { name: "rad-tui" }.into())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user