summaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index d58d10b..69a872b 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -22,11 +22,11 @@ pub trait Handler: Send + Sync + 'static {
type Body: Serialize + for<'a> Deserialize<'a> + Send + Clone;
fn init(node_id: String, node_ids: Vec<String>, output: Output<Self::Body>) -> Self;
- fn handle(
- &self,
+ fn handle<'a>(
+ self: &'a Arc<Self>,
header: MessageHeader,
body: Self::Body,
- ) -> impl Future<Output = ()> + Send + '_;
+ ) -> impl Future<Output = ()> + Send + 'a;
}
pub fn run_server<H: Handler>() {