M Cargo.toml +7 -4
@@ 20,13 20,16 @@ include = [
[dependencies]
async-trait = "0.1"
-bytes = "0.5"
+bytes = "1"
futures = "0.3"
[dependencies.tokio]
-version = "0.2"
-features = ["rt-core", "io-util", "io-std", "uds", "process", "macros", "stream"]
+version = "1"
+features = ["rt", "io-util", "io-std", "net", "process", "macros"]
+
+[dependencies.tokio-stream]
+version = "0.1"
[dependencies.tokio-util]
-version = "0.3"
+version = "0.6"
features = ["codec"]
M examples/chgclient.rs +1 -1
@@ 32,7 32,7 @@ impl UiHandler for StdUiHandler {
}
}
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn run() -> io::Result<i32> {
let sock_path = env::var_os("CHGSOCKNAME").expect("specify CHGSOCKNAME");
let mut handler = StdUiHandler {
M examples/pipeclient.rs +1 -1
@@ 30,7 30,7 @@ impl UiHandler for BufferedUiHandler {
}
}
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn run() -> io::Result<i32> {
let mut handler = BufferedUiHandler {
buf: BytesMut::new(),
M src/protocol.rs +1 -1
@@ 3,7 3,7 @@
use bytes::Bytes;
use futures::SinkExt;
use std::io;
-use tokio::stream::{self, StreamExt};
+use tokio_stream::{self as stream, StreamExt};
use crate::codec::{BlockMessage, ChannelMessage};
use crate::connection::Connection;