Upgrade to Tokio 1.0.0 ecosystem (#530)

* Upgrade Tonic to Tokio 1.0

Work in progress for updating Tonic to Tokio 1.0. Since tower has not
been released to crates.io, a git dependency is taken instead.

* Upgrade Tonic to Tokio 1.0 phase 2

* tonic: remove tower-* deps

* Apply suggestions from code review

Co-authored-by: Ed Marshall <[email protected]>
Co-authored-by: Lucio Franco <[email protected]>
This commit is contained in:
Quentin Perez
2021-01-11 12:18:34 -05:00
committed by GitHub
co-authored by Ed Marshall Lucio Franco
parent fe4d5b9d9a
commit fdda5ae26a
42 changed files with 185 additions and 185 deletions
+4 -2
View File
@@ -36,9 +36,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
match listenfd::ListenFd::from_env().take_tcp_listener(0)? {
Some(listener) => {
let mut listener = tokio::net::TcpListener::from_std(listener)?;
let listener = tokio_stream::wrappers::TcpListenerStream::new(
tokio::net::TcpListener::from_std(listener)?,
);
server.serve_with_incoming(listener.incoming()).await?;
server.serve_with_incoming(listener).await?;
}
None => {
server.serve(addr).await?;