2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-05-23 23:41:30 +00:00

Reindent de-macrofied code.

This commit only affects whitespace; `git diff -w` for it is empty.
This commit is contained in:
Nicholas Nethercote 2022-03-11 12:40:05 +11:00
parent 1146c66f1b
commit 01ede03e0a
6 changed files with 3129 additions and 3129 deletions

View file

@ -22,12 +22,12 @@ cfg_unstable_default! {
pub use core::future::Future as Future;
#[doc = r#"
#[doc = r#"
Extension methods for [`Future`].
[`Future`]: ../future/trait.Future.html
"#]
pub trait FutureExt: Future {
"#]
pub trait FutureExt: Future {
/// Returns a Future that delays execution for a specified time.
///
/// # Examples
@ -282,7 +282,7 @@ pub use core::future::Future as Future;
{
TimeoutFuture::new(self, dur)
}
}
}
impl<T: Future + ?Sized> FutureExt for T {}

View file

@ -17,12 +17,12 @@ use crate::task::{Context, Poll};
pub use futures_io::AsyncBufRead as BufRead;
#[doc = r#"
#[doc = r#"
Extension methods for [`BufRead`].
[`BufRead`]: ../trait.BufRead.html
"#]
pub trait BufReadExt: BufRead {
"#]
pub trait BufReadExt: BufRead {
#[doc = r#"
Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
@ -235,7 +235,7 @@ pub use futures_io::AsyncBufRead as BufRead;
read: 0,
}
}
}
}
impl<T: BufRead + ?Sized> BufReadExt for T {}

View file

@ -23,12 +23,12 @@ pub use take::Take;
pub use futures_io::AsyncRead as Read;
#[doc = r#"
#[doc = r#"
Extension methods for [`Read`].
[`Read`]: ../trait.Read.html
"#]
pub trait ReadExt: Read {
"#]
pub trait ReadExt: Read {
#[doc = r#"
Reads some bytes from the byte stream.
@ -371,7 +371,7 @@ pub use futures_io::AsyncRead as Read;
fn chain<R: Read>(self, next: R) -> Chain<Self, R> where Self: Sized {
Chain { first: self, second: next, done_first: false }
}
}
}
impl<T: Read + ?Sized> ReadExt for T {}

View file

@ -6,12 +6,12 @@ use crate::io::SeekFrom;
pub use futures_io::AsyncSeek as Seek;
#[doc = r#"
#[doc = r#"
Extension methods for [`Seek`].
[`Seek`]: ../trait.Seek.html
"#]
pub trait SeekExt: Seek {
"#]
pub trait SeekExt: Seek {
#[doc = r#"
Seeks to a new position in a byte stream.
@ -45,6 +45,6 @@ pub use futures_io::AsyncSeek as Seek;
{
SeekFuture { seeker: self, pos }
}
}
}
impl<T: Seek + ?Sized> SeekExt for T {}

View file

@ -14,12 +14,12 @@ use crate::io::{self, IoSlice};
pub use futures_io::AsyncWrite as Write;
#[doc = r#"
#[doc = r#"
Extension methods for [`Write`].
[`Write`]: ../trait.Write.html
"#]
pub trait WriteExt: Write {
"#]
pub trait WriteExt: Write {
#[doc = r#"
Writes some bytes into the byte stream.
@ -182,6 +182,6 @@ pub use futures_io::AsyncWrite as Write;
.map_err(|_| io::Error::new(io::ErrorKind::Other, "formatter error"));
WriteFmtFuture { writer: self, res: Some(res), buffer: None, amt: 0 }
}
}
}
impl<T: Write + ?Sized> WriteExt for T {}

View file

@ -145,12 +145,12 @@ cfg_unstable! {
pub use futures_core::stream::Stream as Stream;
#[doc = r#"
#[doc = r#"
Extension methods for [`Stream`].
[`Stream`]: ../stream/trait.Stream.html
"#]
pub trait StreamExt: Stream {
"#]
pub trait StreamExt: Stream {
#[doc = r#"
Advances the stream and returns the next value.
@ -2304,7 +2304,7 @@ pub use futures_core::stream::Stream as Stream;
{
Product::product(self)
}
}
}
impl<T: Stream + ?Sized> StreamExt for T {}