Skip to content

Commit

Permalink
compat: update traits naming to match tokio 1.0 (#3324)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored Dec 23, 2020
1 parent ce0e9c6 commit aa6597b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tokio-util/src/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<T: futures_io::AsyncWrite> FuturesAsyncWriteCompatExt for T {}

/// Extension trait that allows converting a type implementing
/// `tokio::io::AsyncRead` to implement `futures_io::AsyncRead`.
pub trait Tokio02AsyncReadCompatExt: tokio::io::AsyncRead {
pub trait TokioAsyncReadCompatExt: tokio::io::AsyncRead {
/// Wraps `self` with a compatibility layer that implements
/// `futures_io::AsyncRead`.
fn compat(self) -> Compat<Self>
Expand All @@ -59,11 +59,11 @@ pub trait Tokio02AsyncReadCompatExt: tokio::io::AsyncRead {
}
}

impl<T: tokio::io::AsyncRead> Tokio02AsyncReadCompatExt for T {}
impl<T: tokio::io::AsyncRead> TokioAsyncReadCompatExt for T {}

/// Extension trait that allows converting a type implementing
/// `tokio::io::AsyncWrite` to implement `futures_io::AsyncWrite`.
pub trait Tokio02AsyncWriteCompatExt: tokio::io::AsyncWrite {
pub trait TokioAsyncWriteCompatExt: tokio::io::AsyncWrite {
/// Wraps `self` with a compatibility layer that implements
/// `futures_io::AsyncWrite`.
fn compat_write(self) -> Compat<Self>
Expand All @@ -74,7 +74,7 @@ pub trait Tokio02AsyncWriteCompatExt: tokio::io::AsyncWrite {
}
}

impl<T: tokio::io::AsyncWrite> Tokio02AsyncWriteCompatExt for T {}
impl<T: tokio::io::AsyncWrite> TokioAsyncWriteCompatExt for T {}

// === impl Compat ===

Expand Down

0 comments on commit aa6597b

Please sign in to comment.