diff options
author | Yureka <tvl@yuka.dev> | 2024-07-20T18·15+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-07-21T11·01+0000 |
commit | ca8e2b9fbf4e58416655f237db02a331d0bc1f3d (patch) | |
tree | 0c14bd4a21e5367600cc9d0bcda563a33a879538 /tvix/castore/src/tonic.rs | |
parent | 1515a970bedbb6d7b5e8f966dddd0d8fff9bb03c (diff) |
chore(tvix): upgrade to tonic 0.12 / hyper 1.0 r/8385
Change-Id: Idd8ce48869ddd869d51a10959b920f1290a8a9b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11991 Autosubmit: yuka <yuka@yuka.dev> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src/tonic.rs')
-rw-r--r-- | tvix/castore/src/tonic.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tvix/castore/src/tonic.rs b/tvix/castore/src/tonic.rs index 4b65d6b028ef..e63e1ad7aab8 100644 --- a/tvix/castore/src/tonic.rs +++ b/tvix/castore/src/tonic.rs @@ -1,3 +1,4 @@ +use hyper_util::rt::TokioIo; use tokio::net::UnixStream; use tonic::transport::{Channel, Endpoint}; @@ -25,7 +26,10 @@ pub async fn channel_from_url(url: &url::Url) -> Result<Channel, self::Error> { let connector = tower::service_fn({ let url = url.clone(); - move |_: tonic::transport::Uri| UnixStream::connect(url.path().to_string().clone()) + move |_: tonic::transport::Uri| { + let unix = UnixStream::connect(url.path().to_string().clone()); + async move { Ok::<_, std::io::Error>(TokioIo::new(unix.await?)) } + } }); // the URL doesn't matter |