diff --git a/tokio-postgres-openssl/Cargo.toml b/tokio-postgres-openssl/Cargo.toml index a97beedf..3903050e 100644 --- a/tokio-postgres-openssl/Cargo.toml +++ b/tokio-postgres-openssl/Cargo.toml @@ -2,6 +2,7 @@ name = "tokio-postgres-openssl" version = "0.1.0" authors = ["Steven Fackler "] +edition = "2018" [dependencies] futures = "0.1" diff --git a/tokio-postgres-openssl/src/lib.rs b/tokio-postgres-openssl/src/lib.rs index 802ee0ad..58aabba5 100644 --- a/tokio-postgres-openssl/src/lib.rs +++ b/tokio-postgres-openssl/src/lib.rs @@ -1,15 +1,6 @@ -extern crate openssl; -extern crate tokio_io; -extern crate tokio_openssl; -extern crate tokio_postgres; +#![warn(rust_2018_idioms)] -#[macro_use] -extern crate futures; - -#[cfg(test)] -extern crate tokio; - -use futures::{Async, Future, Poll}; +use futures::{try_ready, Async, Future, Poll}; use openssl::hash::MessageDigest; use openssl::nid::Nid; use openssl::ssl::{ConnectConfiguration, HandshakeError, SslRef}; diff --git a/tokio-postgres-openssl/src/test.rs b/tokio-postgres-openssl/src/test.rs index 7347a242..72d1dd78 100644 --- a/tokio-postgres-openssl/src/test.rs +++ b/tokio-postgres-openssl/src/test.rs @@ -4,7 +4,7 @@ use tokio::net::TcpStream; use tokio::runtime::current_thread::Runtime; use tokio_postgres::{self, PreferTls, RequireTls, TlsMode}; -use TlsConnector; +use crate::TlsConnector; fn smoke_test(builder: &tokio_postgres::Builder, tls: T) where