Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
//! #
Expand All @@ -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(()) }) }
//! ```
Expand Down Expand Up @@ -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};
Expand Down
16 changes: 10 additions & 6 deletions src/io/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -301,11 +305,11 @@ extension_trait! {
# Ok(()) }) }
```
"#]
fn take(self, limit: u64) -> take::Take<Self>
fn take(self, limit: u64) -> Take<Self>
where
Self: Sized,
{
take::Take { inner: self, limit }
Take { inner: self, limit }
}

#[doc = r#"
Expand Down Expand Up @@ -377,8 +381,8 @@ extension_trait! {
# Ok(()) }) }
```
"#]
fn bytes(self) -> bytes::Bytes<Self> where Self: Sized {
bytes::Bytes { inner: self }
fn bytes(self) -> Bytes<Self> where Self: Sized {
Bytes { inner: self }
}

#[doc = r#"
Expand Down Expand Up @@ -413,8 +417,8 @@ extension_trait! {
# Ok(()) }) }
```
"#]
fn chain<R: Read>(self, next: R) -> chain::Chain<Self, R> where Self: Sized {
chain::Chain { first: self, second: next, done_first: false }
fn chain<R: Read>(self, next: R) -> Chain<Self, R> where Self: Sized {
Chain { first: self, second: next, done_first: false }
}

}
Expand Down