diff --git a/tokio-postgres/Cargo.toml b/tokio-postgres/Cargo.toml index f3bf3338..0d399ae0 100644 --- a/tokio-postgres/Cargo.toml +++ b/tokio-postgres/Cargo.toml @@ -49,7 +49,7 @@ phf = "0.8" postgres-protocol = { version = "0.5.0", path = "../postgres-protocol" } postgres-types = { version = "0.1.0", path = "../postgres-types" } tokio = { version = "0.2", features = ["io-util"] } -tokio-util = { version = "0.2", features = ["codec"] } +tokio-util = { version = "0.3", features = ["codec"] } [dev-dependencies] tokio = { version = "0.2", features = ["full"] } diff --git a/tokio-postgres/src/codec.rs b/tokio-postgres/src/codec.rs index 2fae8bc1..9d078044 100644 --- a/tokio-postgres/src/codec.rs +++ b/tokio-postgres/src/codec.rs @@ -37,8 +37,7 @@ impl FallibleIterator for BackendMessages { pub struct PostgresCodec; -impl Encoder for PostgresCodec { - type Item = FrontendMessage; +impl Encoder for PostgresCodec { type Error = io::Error; fn encode(&mut self, item: FrontendMessage, dst: &mut BytesMut) -> io::Result<()> {