Skip to content

Commit fb67926

Browse files
committed
Update to tokio 0.2
1 parent 6063589 commit fb67926

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ An implementation of SSL streams for Tokio backed by OpenSSL
1313

1414
[dependencies]
1515
openssl = "0.10.1"
16-
tokio-io = "=0.2.0-alpha.6"
16+
tokio = "0.2"
1717

1818
[dev-dependencies]
19-
futures-preview = "=0.3.0-alpha.19"
20-
tokio = "=0.2.0-alpha.6"
19+
futures = "0.3"
20+
tokio = { version = "0.2", features = ["full"] }

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ use std::future::Future;
2323
use std::io::{self, Read, Write};
2424
use std::pin::Pin;
2525
use std::task::{Context, Poll};
26-
use tokio_io::{AsyncRead, AsyncWrite};
26+
use tokio::io::{AsyncRead, AsyncWrite};
27+
use std::mem::MaybeUninit;
2728

2829
/// Asynchronously performs a client-side TLS handshake over the provided stream.
2930
pub async fn connect<S>(
@@ -172,7 +173,7 @@ impl<S> AsyncRead for SslStream<S>
172173
where
173174
S: AsyncRead + AsyncWrite + Unpin,
174175
{
175-
unsafe fn prepare_uninitialized_buffer(&self, _: &mut [u8]) -> bool {
176+
unsafe fn prepare_uninitialized_buffer(&self, _: &mut [MaybeUninit<u8>]) -> bool {
176177
// Note that this does not forward to `S` because the buffer is
177178
// unconditionally filled in by OpenSSL, not the actual object `S`.
178179
// We're decrypting bytes from `S` into the buffer above!

0 commit comments

Comments
 (0)