diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index be59df10..15b1b32e 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -37,7 +37,7 @@ with-time-0_3 = ["tokio-postgres/with-time-0_3"] [dependencies] bytes = "1.0" fallible-iterator = "0.2" -futures = "0.3" +futures-util = { version = "0.3", features = ["sink"] } tokio-postgres = { version = "0.7.6", path = "../tokio-postgres" } tokio = { version = "1.0", features = ["rt", "time"] } @@ -45,3 +45,4 @@ log = "0.4" [dev-dependencies] criterion = "0.3" +tokio = { version = "1.0", features = ["rt-multi-thread"] } diff --git a/postgres/src/binary_copy.rs b/postgres/src/binary_copy.rs index 98ae666b..1c4eb7d3 100644 --- a/postgres/src/binary_copy.rs +++ b/postgres/src/binary_copy.rs @@ -4,7 +4,7 @@ use crate::connection::ConnectionRef; use crate::types::{BorrowToSql, ToSql, Type}; use crate::{CopyInWriter, CopyOutReader, Error}; use fallible_iterator::FallibleIterator; -use futures::StreamExt; +use futures_util::StreamExt; use std::pin::Pin; #[doc(inline)] pub use tokio_postgres::binary_copy::BinaryCopyOutRow; diff --git a/postgres/src/connection.rs b/postgres/src/connection.rs index 453eef3a..b91c1655 100644 --- a/postgres/src/connection.rs +++ b/postgres/src/connection.rs @@ -1,6 +1,5 @@ use crate::{Error, Notification}; -use futures::future; -use futures::{pin_mut, Stream}; +use futures_util::{future, pin_mut, Stream}; use std::collections::VecDeque; use std::future::Future; use std::ops::{Deref, DerefMut}; diff --git a/postgres/src/copy_in_writer.rs b/postgres/src/copy_in_writer.rs index c996ed85..7de66363 100644 --- a/postgres/src/copy_in_writer.rs +++ b/postgres/src/copy_in_writer.rs @@ -1,7 +1,7 @@ use crate::connection::ConnectionRef; use crate::lazy_pin::LazyPin; use bytes::{Bytes, BytesMut}; -use futures::SinkExt; +use futures_util::SinkExt; use std::io; use std::io::Write; use tokio_postgres::{CopyInSink, Error}; diff --git a/postgres/src/copy_out_reader.rs b/postgres/src/copy_out_reader.rs index e8b478d4..828b7187 100644 --- a/postgres/src/copy_out_reader.rs +++ b/postgres/src/copy_out_reader.rs @@ -1,7 +1,7 @@ use crate::connection::ConnectionRef; use crate::lazy_pin::LazyPin; use bytes::{Buf, Bytes}; -use futures::StreamExt; +use futures_util::StreamExt; use std::io::{self, BufRead, Read}; use tokio_postgres::CopyOutStream; diff --git a/postgres/src/notifications.rs b/postgres/src/notifications.rs index ea44c31f..c31d4f63 100644 --- a/postgres/src/notifications.rs +++ b/postgres/src/notifications.rs @@ -3,7 +3,7 @@ use crate::connection::ConnectionRef; use crate::{Error, Notification}; use fallible_iterator::FallibleIterator; -use futures::{ready, FutureExt}; +use futures_util::{ready, FutureExt}; use std::pin::Pin; use std::task::Poll; use std::time::Duration; diff --git a/postgres/src/row_iter.rs b/postgres/src/row_iter.rs index 3cd41b90..772e9893 100644 --- a/postgres/src/row_iter.rs +++ b/postgres/src/row_iter.rs @@ -1,6 +1,6 @@ use crate::connection::ConnectionRef; use fallible_iterator::FallibleIterator; -use futures::StreamExt; +use futures_util::StreamExt; use std::pin::Pin; use tokio_postgres::{Error, Row, RowStream};