From ac8a81164bcf964f75bd44d45038e52f95f02e8c Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 6 Jan 2021 13:49:15 +0800 Subject: [PATCH 1/3] update tokio => 1.0 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c211fa9..4ee4b87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ edition = "2018" [dependencies] async-trait = { version = "0.1", optional = true } -tokio = { version = "0.3", features = ["io-util"], optional = true } +tokio = { version = "1.0", features = ["io-util"], optional = true } futures-util = { version = "0.3", optional = true, features = ["io"] } [dev-dependencies] -tokio = { version = "0.3", features = ["fs", "rt-multi-thread", "macros"] } +tokio = { version = "1.0", features = ["fs", "rt-multi-thread", "macros"] } bencher = "~0.1" [[example]] From 31a30316536d1f16396f5cb2bf639b4bc74b63fc Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 6 Jan 2021 16:00:19 +0800 Subject: [PATCH 2/3] fix tokio use path --- src/reader.rs | 2 +- src/writer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reader.rs b/src/reader.rs index f47e826..34f3f43 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -5,7 +5,7 @@ use crate::fixed::FixedInt; use crate::varint::{VarInt, MSB}; #[cfg(feature = "tokio_async")] -use tokio::{io::AsyncReadExt, prelude::*}; +use tokio::{io::{AsyncReadExt, AsyncRead, AsyncWrite}}; #[cfg(feature = "futures_async")] use futures_util::{io::AsyncRead, io::AsyncReadExt}; diff --git a/src/writer.rs b/src/writer.rs index f7ae190..c39f8bb 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -4,7 +4,7 @@ use crate::fixed::FixedInt; use crate::varint::VarInt; #[cfg(feature = "tokio_async")] -use tokio::{io::AsyncWriteExt, prelude::*}; +use tokio::io::{AsyncWrite, AsyncWriteExt}; #[cfg(feature = "futures_async")] use futures_util::{io::AsyncWrite, io::AsyncWriteExt}; From 5e61738e51c3e172cc5279fed52d9b6155199a73 Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 6 Jan 2021 16:05:53 +0800 Subject: [PATCH 3/3] fix warning --- src/reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.rs b/src/reader.rs index 34f3f43..28d9f73 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -5,7 +5,7 @@ use crate::fixed::FixedInt; use crate::varint::{VarInt, MSB}; #[cfg(feature = "tokio_async")] -use tokio::{io::{AsyncReadExt, AsyncRead, AsyncWrite}}; +use tokio::io::{AsyncReadExt, AsyncRead}; #[cfg(feature = "futures_async")] use futures_util::{io::AsyncRead, io::AsyncReadExt};