diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index 7b84b54b882..b85921f31de 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -284,7 +284,7 @@ //! loop { //! let n = match socket.read(&mut buf).await { //! // socket closed -//! Ok(n) if n == 0 => return, +//! Ok(0) => return, //! Ok(n) => n, //! Err(e) => { //! eprintln!("failed to read from socket; err = {:?}", e);