From 603e896271f3acdcd68e62e664063f49408c3d93 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 17 Aug 2021 01:11:20 +0100 Subject: [PATCH] use tokio::sync import aliases Signed-off-by: Ian Jackson --- src/bin/server.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index 6a97e31..a45bec6 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -24,7 +24,7 @@ pub struct Global { #[derive(Debug)] pub struct Client { ic: Arc, - web: tokio::sync::mpsc::Sender, + web: mpsc::Sender, } pub type RoutedPacket = Box<[u8]>; // not MIME data @@ -41,7 +41,7 @@ struct WebRequest { length_hint: usize, body: hyper::body::Body, boundary_finder: multipart::BoundaryFinder, - reply_to: tokio::sync::oneshot::Sender, + reply_to: oneshot::Sender, warnings: Warnings, conn: Arc, } @@ -221,7 +221,7 @@ async fn handle( //eprintln!("boundary={:?} start={} name={:?} client={}", // boundary, start, &comp.name, &client.ic); - let (reply_to, reply_recv) = tokio::sync::oneshot::channel(); + let (reply_to, reply_recv) = oneshot::channel(); trace!("{} {} request, Content-Length={}", &conn, &client_name, length_hint); let wreq = WebRequest { @@ -278,7 +278,7 @@ async fn run_client(global: Arc, -> Result { struct Outstanding { - reply_to: tokio::sync::oneshot::Sender, + reply_to: oneshot::Sender, oi: OutstandingInner, } #[derive(Debug)] @@ -289,7 +289,7 @@ async fn run_client(global: Arc, let downbound: VecDeque<(/*xxx*/)> = default(); let try_send_response = | - reply_to: tokio::sync::oneshot::Sender, + reply_to: oneshot::Sender, response: WebResponse | { reply_to.send(response) -- 2.30.2