diff --git a/src/reader.rs b/src/reader.rs index c252ede..b788354 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -28,6 +28,8 @@ mod helper_traits { pub(crate) trait AsyncReader: AsyncRead + Unpin {} impl 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`. diff --git a/src/writer.rs b/src/writer.rs index c68f888..15c63f9 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -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 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