summaryrefslogtreecommitdiff
path: root/echo/src
diff options
context:
space:
mode:
Diffstat (limited to 'echo/src')
-rw-r--r--echo/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/echo/src/main.rs b/echo/src/main.rs
index 424a538..cdd3f3b 100644
--- a/echo/src/main.rs
+++ b/echo/src/main.rs
@@ -1,5 +1,5 @@
#![feature(return_position_impl_trait_in_trait)]
-use std::future::Future;
+use std::{future::Future, sync::Arc};
use common::{
msg::*,
@@ -37,11 +37,11 @@ impl Handler for EchoHandler {
EchoHandler { output }
}
- fn handle(
- &self,
+ fn handle<'a>(
+ self: &'a Arc<Self>,
header: MessageHeader,
body: Self::Body,
- ) -> impl Future<Output = ()> + Send + '_ {
+ ) -> impl Future<Output = ()> + Send + 'a {
async move {
match body {
EchoBody::Echo { msg_id, echo } => {