From 6ca7ab512479ff8321b661f3bcd22e3ed272be9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Michel?= Date: Wed, 12 Jul 2023 11:04:37 +0000 Subject: [PATCH] transport trait: apply shared functions on boxed conn --- transport/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transport/src/lib.rs b/transport/src/lib.rs index 0982496..8bfe1d7 100644 --- a/transport/src/lib.rs +++ b/transport/src/lib.rs @@ -131,7 +131,7 @@ pub async fn accept_recv(conn: &mut C) -> anyhow::Result(conn: Arc>) -> anyhow::Result, Error> { +pub async fn accept_recv_shared(conn: Arc>>) -> anyhow::Result, Error> { Ok(std::future::poll_fn(|cx| conn.lock().unwrap().poll_accept_recv(cx)).await?) } @@ -141,7 +141,7 @@ pub async fn accept_bidi(conn: &mut C) -> anyhow::Result(conn: Arc>) -> anyhow::Result, Error> { +pub async fn accept_bidi_shared(conn: Arc>>) -> anyhow::Result, Error> { Ok(std::future::poll_fn(|cx| conn.lock().unwrap().poll_accept_bidi(cx)).await?) } @@ -151,7 +151,7 @@ pub async fn open_send(conn: &mut C) -> anyhow::Result(conn: Arc>) -> anyhow::Result { +pub async fn open_send_shared(conn: Arc>>) -> anyhow::Result { Ok(std::future::poll_fn(|cx| conn.lock().unwrap().poll_open_send(cx)).await?) } @@ -161,7 +161,7 @@ pub async fn open_bidi(conn: &mut C) -> anyhow::Result(conn: Arc>) -> anyhow::Result { +pub async fn open_bidi_shared(conn: Arc>>) -> anyhow::Result { Ok(std::future::poll_fn(|cx| conn.lock().unwrap().poll_open_bidi(cx)).await?) }