Skip to content

Commit

Permalink
Move the base trait re-export outside of extension_trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Mar 11, 2022
1 parent c626a69 commit 1c70420
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/future/future/mod.rs
Expand Up @@ -20,6 +20,8 @@ cfg_unstable_default! {
use crate::future::timeout::TimeoutFuture;
}

pub use core::future::Future as Future;

extension_trait! {
pub trait Future {}

Expand Down
2 changes: 2 additions & 0 deletions src/io/buf_read/mod.rs
Expand Up @@ -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 {}

Expand Down
2 changes: 2 additions & 0 deletions src/io/read/mod.rs
Expand Up @@ -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 {}

Expand Down
2 changes: 2 additions & 0 deletions src/io/seek/mod.rs
Expand Up @@ -4,6 +4,8 @@ use seek::SeekFuture;

use crate::io::SeekFrom;

pub use futures_io::AsyncSeek as Seek;

extension_trait! {
pub trait Seek {}

Expand Down
2 changes: 2 additions & 0 deletions src/io/write/mod.rs
Expand Up @@ -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 {}

Expand Down
2 changes: 2 additions & 0 deletions src/stream/stream/mod.rs
Expand Up @@ -143,6 +143,8 @@ cfg_unstable! {
mod unzip;
}

pub use futures_core::stream::Stream as Stream;

extension_trait! {
pub trait Stream {}

Expand Down
3 changes: 0 additions & 3 deletions src/utils.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 1c70420

Please sign in to comment.