From e5fdccfff04e996a05faf11e3d0ef18a1651915e Mon Sep 17 00:00:00 2001 From: cssivision Date: Wed, 16 Aug 2017 19:17:12 +0800 Subject: [PATCH] update example in doc comment --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 028cc4c46..086e6bb6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,9 +44,11 @@ //! ```no_run //! extern crate futures; //! extern crate tokio_core; +//! extern crate tokio_io; //! //! use futures::{Future, Stream}; -//! use tokio_core::io::{copy, Io}; +//! use tokio_io::AsyncRead; +//! use tokio_io::io::copy; //! use tokio_core::net::TcpListener; //! use tokio_core::reactor::Core; //! @@ -71,7 +73,7 @@ //! //! // ... after which we'll print what happened //! let handle_conn = bytes_copied.map(|amt| { -//! println!("wrote {} bytes", amt) +//! println!("wrote {:?} bytes", amt) //! }).map_err(|err| { //! println!("IO error {:?}", err) //! });