summaryrefslogtreecommitdiff
path: root/src/systems/cmd/cmd_system.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/cmd/cmd_system.rs')
-rw-r--r--src/systems/cmd/cmd_system.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/systems/cmd/cmd_system.rs b/src/systems/cmd/cmd_system.rs
index 3ae4d5e..7272c9e 100644
--- a/src/systems/cmd/cmd_system.rs
+++ b/src/systems/cmd/cmd_system.rs
@@ -9,11 +9,13 @@ use crate::{
},
};
use std::{
- any::{Any, TypeId, type_name},
+ any::{TypeId, type_name},
collections::HashMap,
future::Future,
};
+pub type AnyOutput = (Box<dyn std::any::Any + Send + 'static>, TypeId);
+
pub struct JVCommandContext {
pub help: bool,
pub confirmed: bool,
@@ -93,8 +95,7 @@ where
fn process(
args: Vec<String>,
ctx: JVCommandContext,
- ) -> impl Future<Output = Result<(Box<dyn Any + Send + 'static>, TypeId), CmdProcessError>> + Send
- {
+ ) -> impl Future<Output = Result<AnyOutput, CmdProcessError>> + Send {
async move {
let mut full_args = vec!["jv".to_string()];
@@ -173,7 +174,7 @@ where
fn exec(
input: Input,
collect: Collect,
- ) -> impl Future<Output = Result<(Box<dyn Any + Send + 'static>, TypeId), CmdExecuteError>> + Send;
+ ) -> impl Future<Output = Result<AnyOutput, CmdExecuteError>> + Send;
/// Get output type mapping
fn get_output_type_mapping() -> HashMap<String, TypeId>;