From 9604c971a9b6cf52ba986b5199cf49f73af48366 Mon Sep 17 00:00:00 2001 From: itsusinn Date: Sun, 17 Oct 2021 11:25:06 +0800 Subject: [PATCH] refactor(dispatcher): use anyhow to replace special error In higher-order function,we don't care the type of errors --- src/despatch.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/despatch.rs b/src/despatch.rs index 298c73f..37986b3 100644 --- a/src/despatch.rs +++ b/src/despatch.rs @@ -50,14 +50,10 @@ pub async fn cmd_or_msg_repl_with_listener, Message>>, Cmd) -> FutC + Send + Sync + 'static, - FutC: Future> + Send + 'static, - Result<(), ErrC>: OnError, - ErrC: Debug + Send, + FutC: Future> + Send + 'static, - MH: Fn(Arc, Message>>, String) -> FutM + Send + Sync + 'static, - FutM: Future> + Send + 'static, - Result<(), ErrM>: OnError, - ErrM: Debug + Send, + MH: Fn(Arc, Message>>) -> FutM + Send + Sync + 'static, + FutM: Future> + Send + 'static, N: Into + Send + Clone + 'static,