Skip to content

Commit

Permalink
Merge pull request #1 from cibingeorge/master
Browse files Browse the repository at this point in the history
Upgrading to tokio 1.0
  • Loading branch information
krojew authored Jan 5, 2021
2 parents b1a2145 + 3d68f7a commit cdd8313
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ chrono = "0.4"
fnv = "1.0"
log = "0.4.1"
lz4-compress = "=0.1.0"
bb8 = "0.6"
bb8 = "0.7"
rand = "0.4.1"
snap = "0.2.3"
time = "0.2.16"
tokio = { version = "0.3", features = ["net", "io-util", "rt", "sync", "macros", "rt-multi-thread"] }
tokio-rustls = { version = "0.20", optional = true }
tokio = { version = "1.0", features = ["net", "io-util", "rt", "sync", "macros", "rt-multi-thread"] }
tokio-rustls = { version = "0.22", optional = true }
uuid = "0.8.1"
webpki = { version = "0.21", optional = true }

[dependencies.rustls]
version = "0.18"
version = "0.19"
optional = true
default-features = false

Expand Down
7 changes: 3 additions & 4 deletions src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ use std::sync::Arc;
#[cfg(feature = "rust-tls")]
use tokio_rustls::{TlsConnector as RustlsConnector, client::TlsStream as RustlsStream};
use std::io;
use tokio::io::{AsyncWriteExt, ReadBuf};
use tokio::prelude::*;
use tokio::io::{AsyncWriteExt, AsyncWrite, AsyncRead, ReadBuf};
use std::task::Context;
use tokio::macros::support::{Pin, Poll};
use std::io::Error;
Expand Down Expand Up @@ -103,8 +102,8 @@ impl CDRSTransport for TransportTcp {
})
}

async fn close(&mut self, close: net::Shutdown) -> io::Result<()> {
self.tcp.shutdown(close)
async fn close(&mut self, _close: net::Shutdown) -> io::Result<()> {
self.tcp.shutdown().await
}

fn is_alive(&self) -> bool {
Expand Down

0 comments on commit cdd8313

Please sign in to comment.