mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
Merge pull request #238 from cssivision/master
update example in doc comment
This commit is contained in:
commit
6090e22135
@ -44,9 +44,11 @@
|
|||||||
//! ```no_run
|
//! ```no_run
|
||||||
//! extern crate futures;
|
//! extern crate futures;
|
||||||
//! extern crate tokio_core;
|
//! extern crate tokio_core;
|
||||||
|
//! extern crate tokio_io;
|
||||||
//!
|
//!
|
||||||
//! use futures::{Future, Stream};
|
//! 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::net::TcpListener;
|
||||||
//! use tokio_core::reactor::Core;
|
//! use tokio_core::reactor::Core;
|
||||||
//!
|
//!
|
||||||
@ -71,7 +73,7 @@
|
|||||||
//!
|
//!
|
||||||
//! // ... after which we'll print what happened
|
//! // ... after which we'll print what happened
|
||||||
//! let handle_conn = bytes_copied.map(|amt| {
|
//! let handle_conn = bytes_copied.map(|amt| {
|
||||||
//! println!("wrote {} bytes", amt)
|
//! println!("wrote {:?} bytes", amt)
|
||||||
//! }).map_err(|err| {
|
//! }).map_err(|err| {
|
||||||
//! println!("IO error {:?}", err)
|
//! println!("IO error {:?}", err)
|
||||||
//! });
|
//! });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user