2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-30 17:25:32 +00:00

Remove what's left of the first trait in extension_trait.

This commit is contained in:
Nicholas Nethercote 2022-03-11 12:27:23 +11:00
parent 1c70420c5a
commit 2dde8820fa
7 changed files with 7 additions and 25 deletions

View file

@ -23,14 +23,12 @@ cfg_unstable_default! {
pub use core::future::Future as Future; pub use core::future::Future as Future;
extension_trait! { extension_trait! {
pub trait Future {}
#[doc = r#" #[doc = r#"
Extension methods for [`Future`]. Extension methods for [`Future`].
[`Future`]: ../future/trait.Future.html [`Future`]: ../future/trait.Future.html
"#] "#]
pub trait FutureExt: core::future::Future { pub trait FutureExt: Future {
/// Returns a Future that delays execution for a specified time. /// Returns a Future that delays execution for a specified time.
/// ///
/// # Examples /// # Examples

View file

@ -18,14 +18,12 @@ use crate::task::{Context, Poll};
pub use futures_io::AsyncBufRead as BufRead; pub use futures_io::AsyncBufRead as BufRead;
extension_trait! { extension_trait! {
pub trait BufRead {}
#[doc = r#" #[doc = r#"
Extension methods for [`BufRead`]. Extension methods for [`BufRead`].
[`BufRead`]: ../trait.BufRead.html [`BufRead`]: ../trait.BufRead.html
"#] "#]
pub trait BufReadExt: futures_io::AsyncBufRead { pub trait BufReadExt: BufRead {
#[doc = r#" #[doc = r#"
Reads all bytes into `buf` until the delimiter `byte` or EOF is reached. Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.

View file

@ -24,14 +24,12 @@ pub use take::Take;
pub use futures_io::AsyncRead as Read; pub use futures_io::AsyncRead as Read;
extension_trait! { extension_trait! {
pub trait Read {}
#[doc = r#" #[doc = r#"
Extension methods for [`Read`]. Extension methods for [`Read`].
[`Read`]: ../trait.Read.html [`Read`]: ../trait.Read.html
"#] "#]
pub trait ReadExt: futures_io::AsyncRead { pub trait ReadExt: Read {
#[doc = r#" #[doc = r#"
Reads some bytes from the byte stream. Reads some bytes from the byte stream.

View file

@ -7,14 +7,12 @@ use crate::io::SeekFrom;
pub use futures_io::AsyncSeek as Seek; pub use futures_io::AsyncSeek as Seek;
extension_trait! { extension_trait! {
pub trait Seek {}
#[doc = r#" #[doc = r#"
Extension methods for [`Seek`]. Extension methods for [`Seek`].
[`Seek`]: ../trait.Seek.html [`Seek`]: ../trait.Seek.html
"#] "#]
pub trait SeekExt: futures_io::AsyncSeek { pub trait SeekExt: Seek {
#[doc = r#" #[doc = r#"
Seeks to a new position in a byte stream. Seeks to a new position in a byte stream.

View file

@ -15,14 +15,12 @@ use crate::io::{self, IoSlice};
pub use futures_io::AsyncWrite as Write; pub use futures_io::AsyncWrite as Write;
extension_trait! { extension_trait! {
pub trait Write {}
#[doc = r#" #[doc = r#"
Extension methods for [`Write`]. Extension methods for [`Write`].
[`Write`]: ../trait.Write.html [`Write`]: ../trait.Write.html
"#] "#]
pub trait WriteExt: futures_io::AsyncWrite { pub trait WriteExt: Write {
#[doc = r#" #[doc = r#"
Writes some bytes into the byte stream. Writes some bytes into the byte stream.

View file

@ -146,14 +146,12 @@ cfg_unstable! {
pub use futures_core::stream::Stream as Stream; pub use futures_core::stream::Stream as Stream;
extension_trait! { extension_trait! {
pub trait Stream {}
#[doc = r#" #[doc = r#"
Extension methods for [`Stream`]. Extension methods for [`Stream`].
[`Stream`]: ../stream/trait.Stream.html [`Stream`]: ../stream/trait.Stream.html
"#] "#]
pub trait StreamExt: futures_core::stream::Stream { pub trait StreamExt: Stream {
#[doc = r#" #[doc = r#"
Advances the stream and returns the next value. Advances the stream and returns the next value.

View file

@ -246,14 +246,8 @@ macro_rules! cfg_default {
#[doc(hidden)] #[doc(hidden)]
macro_rules! extension_trait { macro_rules! extension_trait {
( (
// Interesting patterns:
// - `$name`: trait name that gets rendered in the docs
// - `$ext`: name of the hidden extension trait
// - `$base`: base trait
pub trait $name:ident {}
#[doc = $doc_ext:tt] #[doc = $doc_ext:tt]
pub trait $ext:ident: $base:path { pub trait $ext:ident: $name:ident {
$($body_ext:tt)* $($body_ext:tt)*
} }
) => { ) => {