Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/terminal: remove unused trait
Fintan Halpenny committed 6 months ago
commit 1f80eb61edf268b046cef3441e26ed86bffa289b
parent d41ac59828c9b55bb06184b6ecceda30717be561
1 file changed +0 -15
modified crates/radicle-cli/src/terminal.rs
@@ -36,21 +36,6 @@ impl Context for Profile {
    }
}

-
/// A command that can be run.
-
pub trait Command<A: Args, C: Context> {
-
    /// Run the command, given arguments and a context.
-
    fn run(self, args: A, context: C) -> anyhow::Result<()>;
-
}
-

-
impl<F, A: Args, C: Context> Command<A, C> for F
-
where
-
    F: FnOnce(A, C) -> anyhow::Result<()>,
-
{
-
    fn run(self, args: A, context: C) -> anyhow::Result<()> {
-
        self(args, context)
-
    }
-
}
-

/// Execute a function `cmd` that runs a command with parsed the `args`
/// and a default context.
pub fn run_command_fn<F, P: Parser, C>(cmd: F, args: P, ctx: C) -> !