diff --git a/tokio-postgres/Cargo.toml b/tokio-postgres/Cargo.toml index 0cd04bd0..40f62a17 100644 --- a/tokio-postgres/Cargo.toml +++ b/tokio-postgres/Cargo.toml @@ -41,7 +41,6 @@ futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] } log = "0.4" parking_lot = "0.9" percent-encoding = "1.0" -pin-utils = "=0.1.0-alpha.4" pin-project = "0.4" phf = "0.7.23" postgres-protocol = { version = "=0.5.0-alpha.1", path = "../postgres-protocol" } diff --git a/tokio-postgres/benches/bench.rs b/tokio-postgres/benches/bench.rs index 4369242f..fececa2b 100644 --- a/tokio-postgres/benches/bench.rs +++ b/tokio-postgres/benches/bench.rs @@ -32,9 +32,7 @@ fn query_prepared(c: &mut Criterion) { let (client, runtime) = setup(); let statement = runtime.block_on(client.prepare("SELECT $1::INT8")).unwrap(); c.bench_function("executor_block_on", move |b| { - b.iter(|| { - executor::block_on(client.query(&statement, &[&1i64])).unwrap() - }) + b.iter(|| executor::block_on(client.query(&statement, &[&1i64])).unwrap()) }); let (client, runtime) = setup(); diff --git a/tokio-postgres/src/client.rs b/tokio-postgres/src/client.rs index e0133bb3..34d11b5f 100644 --- a/tokio-postgres/src/client.rs +++ b/tokio-postgres/src/client.rs @@ -21,10 +21,8 @@ use crate::{Error, Statement}; use bytes::{BytesMut, IntoBuf}; use fallible_iterator::FallibleIterator; use futures::channel::mpsc; -use futures::{future, TryStream, TryStreamExt}; -use futures::{ready, StreamExt}; +use futures::{future, pin_mut, ready, StreamExt, TryStream, TryStreamExt}; use parking_lot::Mutex; -use pin_utils::pin_mut; use postgres_protocol::message::backend::Message; use std::collections::HashMap; use std::error; diff --git a/tokio-postgres/src/connect.rs b/tokio-postgres/src/connect.rs index 5452d1e7..db2ddc85 100644 --- a/tokio-postgres/src/connect.rs +++ b/tokio-postgres/src/connect.rs @@ -4,9 +4,7 @@ use crate::connect_raw::connect_raw; use crate::connect_socket::connect_socket; use crate::tls::{MakeTlsConnect, TlsConnect}; use crate::{Client, Config, Connection, Error, SimpleQueryMessage, Socket}; -use futures::{future, Future}; -use futures::{FutureExt, Stream}; -use pin_utils::pin_mut; +use futures::{future, pin_mut, Future, FutureExt, Stream}; use std::io; use std::task::Poll; diff --git a/tokio-postgres/src/copy_in.rs b/tokio-postgres/src/copy_in.rs index ec939929..f4ba95cb 100644 --- a/tokio-postgres/src/copy_in.rs +++ b/tokio-postgres/src/copy_in.rs @@ -5,9 +5,7 @@ use crate::types::ToSql; use crate::{query, Error, Statement}; use bytes::{Buf, BufMut, BytesMut, IntoBuf}; use futures::channel::mpsc; -use futures::ready; -use futures::{SinkExt, Stream, StreamExt, TryStream, TryStreamExt}; -use pin_utils::pin_mut; +use futures::{pin_mut, ready, SinkExt, Stream, StreamExt, TryStream, TryStreamExt}; use postgres_protocol::message::backend::Message; use postgres_protocol::message::frontend; use postgres_protocol::message::frontend::CopyData; diff --git a/tokio-postgres/src/prepare.rs b/tokio-postgres/src/prepare.rs index c00e9127..450d3b0b 100644 --- a/tokio-postgres/src/prepare.rs +++ b/tokio-postgres/src/prepare.rs @@ -7,8 +7,7 @@ use crate::{query, slice_iter}; use crate::{Column, Error, Statement}; use bytes::Bytes; use fallible_iterator::FallibleIterator; -use futures::TryStreamExt; -use pin_utils::pin_mut; +use futures::{pin_mut, TryStreamExt}; use postgres_protocol::message::backend::Message; use postgres_protocol::message::frontend; use std::future::Future;