fix(codec): Enforce encoders/decoders are Sync (#84)

Closes #81
This commit is contained in:
Lucio Franco
2019-10-30 15:00:31 -04:00
committed by GitHub
parent 5b4f4689a2
commit 3ce61d9860
11 changed files with 62 additions and 53 deletions
+3 -2
View File
@@ -108,7 +108,8 @@ impl server::RouteGuide for RouteGuide {
Ok(Response::new(summary))
}
type RouteChatStream = Pin<Box<dyn Stream<Item = Result<RouteNote, Status>> + Send + 'static>>;
type RouteChatStream =
Pin<Box<dyn Stream<Item = Result<RouteNote, Status>> + Send + Sync + 'static>>;
async fn route_chat(
&self,
@@ -138,7 +139,7 @@ impl server::RouteGuide for RouteGuide {
Ok(Response::new(Box::pin(output)
as Pin<
Box<dyn Stream<Item = Result<RouteNote, Status>> + Send + 'static>,
Box<dyn Stream<Item = Result<RouteNote, Status>> + Send + Sync + 'static>,
>))
}
}