2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-30 09:15:33 +00:00

Move the base trait re-export outside of extension_trait.

This commit is contained in:
Nicholas Nethercote 2022-03-11 12:24:15 +11:00
parent c626a69670
commit 1c70420c5a
7 changed files with 12 additions and 3 deletions

View file

@ -20,6 +20,8 @@ cfg_unstable_default! {
use crate::future::timeout::TimeoutFuture;
}
pub use core::future::Future as Future;
extension_trait! {
pub trait Future {}

View file

@ -15,6 +15,8 @@ use std::pin::Pin;
use crate::io;
use crate::task::{Context, Poll};
pub use futures_io::AsyncBufRead as BufRead;
extension_trait! {
pub trait BufRead {}

View file

@ -21,6 +21,8 @@ pub use bytes::Bytes;
pub use chain::Chain;
pub use take::Take;
pub use futures_io::AsyncRead as Read;
extension_trait! {
pub trait Read {}

View file

@ -4,6 +4,8 @@ use seek::SeekFuture;
use crate::io::SeekFrom;
pub use futures_io::AsyncSeek as Seek;
extension_trait! {
pub trait Seek {}

View file

@ -12,6 +12,8 @@ use write_vectored::WriteVectoredFuture;
use crate::io::{self, IoSlice};
pub use futures_io::AsyncWrite as Write;
extension_trait! {
pub trait Write {}

View file

@ -143,6 +143,8 @@ cfg_unstable! {
mod unzip;
}
pub use futures_core::stream::Stream as Stream;
extension_trait! {
pub trait Stream {}

View file

@ -257,9 +257,6 @@ macro_rules! extension_trait {
$($body_ext:tt)*
}
) => {
// Re-export the base trait from the futures crate.
pub use $base as $name;
// The extension trait that adds methods to any type implementing the base trait.
#[doc = $doc_ext]
pub trait $ext: $name {