mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-07 08:56:41 +00:00
Move the base trait re-export outside of extension_trait
.
This commit is contained in:
parent
c626a69670
commit
1c70420c5a
7 changed files with 12 additions and 3 deletions
|
@ -20,6 +20,8 @@ cfg_unstable_default! {
|
||||||
use crate::future::timeout::TimeoutFuture;
|
use crate::future::timeout::TimeoutFuture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub use core::future::Future as Future;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait Future {}
|
pub trait Future {}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ use std::pin::Pin;
|
||||||
use crate::io;
|
use crate::io;
|
||||||
use crate::task::{Context, Poll};
|
use crate::task::{Context, Poll};
|
||||||
|
|
||||||
|
pub use futures_io::AsyncBufRead as BufRead;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait BufRead {}
|
pub trait BufRead {}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ pub use bytes::Bytes;
|
||||||
pub use chain::Chain;
|
pub use chain::Chain;
|
||||||
pub use take::Take;
|
pub use take::Take;
|
||||||
|
|
||||||
|
pub use futures_io::AsyncRead as Read;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait Read {}
|
pub trait Read {}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ use seek::SeekFuture;
|
||||||
|
|
||||||
use crate::io::SeekFrom;
|
use crate::io::SeekFrom;
|
||||||
|
|
||||||
|
pub use futures_io::AsyncSeek as Seek;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait Seek {}
|
pub trait Seek {}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ use write_vectored::WriteVectoredFuture;
|
||||||
|
|
||||||
use crate::io::{self, IoSlice};
|
use crate::io::{self, IoSlice};
|
||||||
|
|
||||||
|
pub use futures_io::AsyncWrite as Write;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait Write {}
|
pub trait Write {}
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,8 @@ cfg_unstable! {
|
||||||
mod unzip;
|
mod unzip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub use futures_core::stream::Stream as Stream;
|
||||||
|
|
||||||
extension_trait! {
|
extension_trait! {
|
||||||
pub trait Stream {}
|
pub trait Stream {}
|
||||||
|
|
||||||
|
|
|
@ -257,9 +257,6 @@ macro_rules! extension_trait {
|
||||||
$($body_ext:tt)*
|
$($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.
|
// The extension trait that adds methods to any type implementing the base trait.
|
||||||
#[doc = $doc_ext]
|
#[doc = $doc_ext]
|
||||||
pub trait $ext: $name {
|
pub trait $ext: $name {
|
||||||
|
|
Loading…
Reference in a new issue