diff --git a/src/info/repl/command.rs b/src/info/repl/command.rs index af065b6..5ff7aee 100644 --- a/src/info/repl/command.rs +++ b/src/info/repl/command.rs @@ -112,13 +112,15 @@ pub enum Value String(String), Symbol(String), List(Vec), - - Command(Box), } +/// Trait for commands. +/// +/// # Defining commands +/// A command object should be created once only, and then referenced and executed using `params` and through mutating `cx`. pub trait Command: fmt::Debug { - fn execute(self: Box, cx: &mut Context<'_>, params: Vec) -> eyre::Result<()>; + fn execute(&self, cx: &mut Context<'_>, params: Vec) -> eyre::Result<()>; } /// Command structurally parsed.