@@ -19,9 +19,11 @@ First, let's add a shutdown channel to the `client`:
1919
2020``` rust,edition2018
2121# extern crate async_std;
22- # extern crate futures;
22+ # extern crate futures_channel;
23+ # extern crate futures_util;
2324# use async_std::net::TcpStream;
24- # use futures::{channel::mpsc, SinkExt};
25+ # use futures_channel::mpsc;
26+ # use futures_util::SinkExt;
2527# use std::sync::Arc;
2628#
2729# type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
@@ -68,9 +70,11 @@ We use the `select` macro for this purpose:
6870
6971``` rust,edition2018
7072# extern crate async_std;
71- # extern crate futures;
73+ # extern crate futures_channel;
74+ # extern crate futures_util;
7275# use async_std::{io::Write, net::TcpStream};
73- use futures::{channel::mpsc, select, FutureExt, StreamExt};
76+ use futures_channel::mpsc;
77+ use futures_util::{select, FutureExt, StreamExt};
7478# use std::sync::Arc;
7579
7680# type Receiver<T> = mpsc::UnboundedReceiver<T>;
@@ -118,15 +122,18 @@ The final code looks like this:
118122
119123``` rust,edition2018
120124# extern crate async_std;
121- # extern crate futures;
125+ # extern crate futures_channel;
126+ # extern crate futures_util;
122127use async_std::{
123128 io::{BufReader, BufRead, Write},
124129 net::{TcpListener, TcpStream, ToSocketAddrs},
125130 task,
126131};
127- use futures::{channel::mpsc, future::Future, select, FutureExt, SinkExt, StreamExt};
132+ use futures_channel::mpsc;
133+ use futures_util::{select, FutureExt, SinkExt, StreamExt};
128134use std::{
129135 collections::hash_map::{Entry, HashMap},
136+ future::Future,
130137 sync::Arc,
131138};
132139
0 commit comments