Skip to content

Commit

Permalink
Fix typo & add correct condition for local use
Browse files Browse the repository at this point in the history
  • Loading branch information
dermesser committed Sep 11, 2023
1 parent 921aba6 commit 144ed9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ mod helper_traits {
pub(crate) trait AsyncReader: AsyncRead + Unpin {}
impl<T> AsyncReader for T where T : AsyncRead + Unpin {}
}

#[cfg(any(feature = "tokio_async", feature = "futures_async"))]
use helper_traits::AsyncReader;

/// A trait for reading VarInts from any other `Reader`.
Expand Down
4 changes: 3 additions & 1 deletion src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ mod helper_traits {
#[cfg(all(any(feature = "tokio_async", feature = "futures_async"), not(feature = "sendable_io_traits")))]
mod helper_traits {
#[cfg(feature = "tokio_async")]
use tokio::io::AAsyncWrite;
use tokio::io::AsyncWrite;
#[cfg(feature = "futures_async")]
use futures_util::AsyncWrite;
pub(crate) trait AsyncWriter: AsyncWrite + Unpin {}
impl<T> AsyncWriter for T where T : AsyncWrite + Unpin {}
}

#[cfg(any(feature = "tokio_async", feature = "futures_async"))]
use helper_traits::AsyncWriter;

/// A trait for writing integers in VarInt encoding to any `Write` type. This packs encoding and
Expand Down

0 comments on commit 144ed9c

Please sign in to comment.