From 144ed9c9a550ed808a774cac487640f74b4f8b43 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Mon, 11 Sep 2023 19:23:53 +0200 Subject: [PATCH] Fix typo & add correct condition for local use --- src/reader.rs | 2 ++ src/writer.rs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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