From 43f4f393af2451e9377346f0b8b9120654dc0419 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Tue, 17 Dec 2019 22:48:14 +0900 Subject: [PATCH] fix missing export for the return value --- src/io/mod.rs | 6 +++--- src/io/read/mod.rs | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/io/mod.rs b/src/io/mod.rs index ee1289d3a..056b05cad 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -105,8 +105,8 @@ //! //! ```no_run //! use async_std::fs::File; -//! use async_std::io::BufWriter; //! use async_std::io::prelude::*; +//! use async_std::io::BufWriter; //! //! # fn main() -> std::io::Result<()> { async_std::task::block_on(async { //! # @@ -116,8 +116,8 @@ //! //! // write a byte to the buffer //! writer.write(&[42]).await?; -//! //! } // the buffer is flushed once writer goes out of scope +//! // //! # //! # Ok(()) }) } //! ``` @@ -281,7 +281,7 @@ cfg_std! { pub use copy::copy; pub use cursor::Cursor; pub use empty::{empty, Empty}; - pub use read::Read; + pub use read::*; pub use repeat::{repeat, Repeat}; pub use seek::Seek; pub use sink::{sink, Sink}; diff --git a/src/io/read/mod.rs b/src/io/read/mod.rs index 0d7f4dcc5..8aade1894 100644 --- a/src/io/read/mod.rs +++ b/src/io/read/mod.rs @@ -17,6 +17,10 @@ use std::mem; use crate::io::IoSliceMut; +pub use take::Take; +pub use bytes::Bytes; +pub use chain::Chain; + extension_trait! { use std::pin::Pin; use std::ops::{Deref, DerefMut}; @@ -301,11 +305,11 @@ extension_trait! { # Ok(()) }) } ``` "#] - fn take(self, limit: u64) -> take::Take + fn take(self, limit: u64) -> Take where Self: Sized, { - take::Take { inner: self, limit } + Take { inner: self, limit } } #[doc = r#" @@ -377,8 +381,8 @@ extension_trait! { # Ok(()) }) } ``` "#] - fn bytes(self) -> bytes::Bytes where Self: Sized { - bytes::Bytes { inner: self } + fn bytes(self) -> Bytes where Self: Sized { + Bytes { inner: self } } #[doc = r#" @@ -413,8 +417,8 @@ extension_trait! { # Ok(()) }) } ``` "#] - fn chain(self, next: R) -> chain::Chain where Self: Sized { - chain::Chain { first: self, second: next, done_first: false } + fn chain(self, next: R) -> Chain where Self: Sized { + Chain { first: self, second: next, done_first: false } } }