Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to tokio 1.0 #46

Merged
merged 2 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tokio-native-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ categories = ["asynchronous", "network-programming"]

[dependencies]
native-tls = "0.2"
tokio = "0.3"
tokio = "1.0"

[dev-dependencies]
tokio = { version = "0.3.0", features = ["macros", "stream", "rt", "rt-multi-thread", "io-util", "net"] }
tokio-util = { version = "0.4.0", features = ["full"] }
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "io-util", "net"] }
tokio-util = { version = "0.6.0", features = ["full"] }

cfg-if = "0.1"
env_logger = { version = "0.6", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions tokio-rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = ["asynchronous", "cryptography", "network-programming"]
edition = "2018"

[dependencies]
tokio = "0.3.5"
tokio = "1.0"
rustls = "0.19"
webpki = "0.21"

Expand All @@ -21,7 +21,7 @@ early-data = []
dangerous_configuration = ["rustls/dangerous_configuration"]

[dev-dependencies]
tokio = { version = "0.3.5", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
futures-util = "0.3.1"
lazy_static = "1"
webpki-roots = "0.21"
2 changes: 1 addition & 1 deletion tokio-rustls/examples/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["quininer <quininer@live.com>"]
edition = "2018"

[dependencies]
tokio = { version = "0.3", features = [ "full" ] }
tokio = { version = "1.0", features = [ "full" ] }
argh = "0.1"
tokio-rustls = { path = "../.." }
webpki-roots = "0.21"
2 changes: 1 addition & 1 deletion tokio-rustls/examples/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors = ["quininer <quininer@live.com>"]
edition = "2018"

[dependencies]
tokio = { version = "0.3", features = [ "full" ] }
tokio = { version = "1.0", features = [ "full" ] }
argh = "0.1"
tokio-rustls = { path = "../.." }
2 changes: 1 addition & 1 deletion tokio-rustls/tests/badssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use rustls::ClientConfig;
use std::io;
use std::net::ToSocketAddrs;
use std::sync::Arc;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpStream;
use tokio::prelude::*;
use tokio_rustls::{client::TlsStream, TlsConnector};

async fn get(
Expand Down
4 changes: 2 additions & 2 deletions tokio-rustls/tests/early-data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ use std::process::{Child, Command, Stdio};
use std::sync::Arc;
use std::task::{Context, Poll};
use std::time::Duration;
use tokio::io::ReadBuf;
use tokio::io::{AsyncRead, AsyncWriteExt, ReadBuf};
use tokio::net::TcpStream;
use tokio::prelude::*;
use tokio::time::sleep;
use tokio_rustls::{client::TlsStream, TlsConnector};

Expand Down Expand Up @@ -45,6 +44,7 @@ async fn send(
//
// see https://www.mail-archive.com/openssl-users@openssl.org/msg84451.html
let sleep1 = sleep(Duration::from_secs(1));
futures_util::pin_mut!(sleep1);
let mut stream = match future::select(Read1(stream), sleep1).await {
future::Either::Right((_, Read1(stream))) => stream,
future::Either::Left((Err(err), _)) => return Err(err),
Expand Down
3 changes: 1 addition & 2 deletions tokio-rustls/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use std::net::SocketAddr;
use std::sync::mpsc::channel;
use std::sync::Arc;
use std::{io, thread};
use tokio::io::{copy, split};
use tokio::io::{copy, split, AsyncReadExt, AsyncWriteExt};
use tokio::net::{TcpListener, TcpStream};
use tokio::prelude::*;
use tokio::runtime;
use tokio_rustls::{TlsAcceptor, TlsConnector};

Expand Down