simplify command call

This commit is contained in:
Fernando Herrera 2021-09-25 15:58:04 +01:00
parent b12a265f1e
commit 637e4f6e6d

View File

@ -134,9 +134,11 @@ fn main() -> Result<()> {
let engine_state = engine_state.borrow();
let output = match engine_state.find_decl("table".as_bytes()) {
Some(decl_id) => {
let command = engine_state.get_decl(decl_id);
let table = command.run(&state, &Call::new(), value)?;
let table = engine_state.get_decl(decl_id).run(
&state,
&Call::new(),
value,
)?;
table.into_string()
}
None => value.into_string(),