@@ -19,11 +19,10 @@ First, let's add a shutdown channel to the `connection_loop`:
1919
2020``` rust,edition2018
2121# extern crate async_std;
22- # extern crate futures_channel;
23- # extern crate futures_util;
22+ # extern crate futures;
2423# use async_std::net::TcpStream;
25- # use futures_channel ::mpsc;
26- # use futures_util ::SinkExt;
24+ # use futures::channel ::mpsc;
25+ # use futures ::SinkExt;
2726# use std::sync::Arc;
2827#
2928# type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
@@ -70,11 +69,10 @@ We use the `select` macro for this purpose:
7069
7170``` rust,edition2018
7271# extern crate async_std;
73- # extern crate futures_channel;
74- # extern crate futures_util;
72+ # extern crate futures;
7573# use async_std::{net::TcpStream, prelude::*};
76- use futures_channel ::mpsc;
77- use futures_util ::{select, FutureExt};
74+ use futures::channel ::mpsc;
75+ use futures ::{select, FutureExt};
7876# use std::sync::Arc;
7977
8078# type Receiver<T> = mpsc::UnboundedReceiver<T>;
@@ -122,16 +120,15 @@ The final code looks like this:
122120
123121``` rust,edition2018
124122# extern crate async_std;
125- # extern crate futures_channel;
126- # extern crate futures_util;
123+ # extern crate futures;
127124use async_std::{
128125 io::BufReader,
129126 net::{TcpListener, TcpStream, ToSocketAddrs},
130127 prelude::*,
131128 task,
132129};
133- use futures_channel ::mpsc;
134- use futures_util ::{select, FutureExt, SinkExt};
130+ use futures::channel ::mpsc;
131+ use futures ::{select, FutureExt, SinkExt};
135132use std::{
136133 collections::hash_map::{Entry, HashMap},
137134 future::Future,
0 commit comments