chiark / gitweb /
use tokio::sync import aliases
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 17 Aug 2021 00:11:20 +0000 (01:11 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 17 Aug 2021 00:11:20 +0000 (01:11 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/server.rs

index 6a97e3129490c80f3068fe79756ea0b740892820..a45bec6d92e4351bd75f3484332925527e1302d1 100644 (file)
@@ -24,7 +24,7 @@ pub struct Global {
 #[derive(Debug)]
 pub struct Client {
   ic: Arc<InstanceConfig>,
-  web: tokio::sync::mpsc::Sender<WebRequest>,
+  web: mpsc::Sender<WebRequest>,
 }
 
 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<WebResponse>,
+  reply_to: oneshot::Sender<WebResponse>,
   warnings: Warnings,
   conn: Arc<String>,
 }
@@ -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<Global>,
                     -> Result<Void, AE>
 {
   struct Outstanding {
-    reply_to: tokio::sync::oneshot::Sender<WebResponse>,
+    reply_to: oneshot::Sender<WebResponse>,
     oi: OutstandingInner,
   }
   #[derive(Debug)]
@@ -289,7 +289,7 @@ async fn run_client(global: Arc<Global>,
   let  downbound: VecDeque<(/*xxx*/)> = default();
 
   let try_send_response = |
-    reply_to: tokio::sync::oneshot::Sender<WebResponse>,
+    reply_to: oneshot::Sender<WebResponse>,
     response: WebResponse
   | {
     reply_to.send(response)