diff --git a/tokio-postgres-native-tls/Cargo.toml b/tokio-postgres-native-tls/Cargo.toml index dc4270e8..9ecfb2c3 100644 --- a/tokio-postgres-native-tls/Cargo.toml +++ b/tokio-postgres-native-tls/Cargo.toml @@ -2,6 +2,7 @@ name = "tokio-postgres-native-tls" version = "0.1.0" authors = ["Steven Fackler "] +edition = "2018" [dependencies] futures = "0.1" diff --git a/tokio-postgres-native-tls/src/lib.rs b/tokio-postgres-native-tls/src/lib.rs index cebfe556..54923467 100644 --- a/tokio-postgres-native-tls/src/lib.rs +++ b/tokio-postgres-native-tls/src/lib.rs @@ -1,15 +1,6 @@ -extern crate native_tls; -extern crate tokio_io; -extern crate tokio_postgres; -extern crate tokio_tls; +#![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 tokio_io::{AsyncRead, AsyncWrite}; use tokio_postgres::{ChannelBinding, TlsConnect}; use tokio_tls::{Connect, TlsStream}; diff --git a/tokio-postgres-native-tls/src/test.rs b/tokio-postgres-native-tls/src/test.rs index 8d081efb..15371ad6 100644 --- a/tokio-postgres-native-tls/src/test.rs +++ b/tokio-postgres-native-tls/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