diff --git a/postgres-protocol/Cargo.toml b/postgres-protocol/Cargo.toml index 9f274c02..993e3a27 100644 --- a/postgres-protocol/Cargo.toml +++ b/postgres-protocol/Cargo.toml @@ -12,7 +12,7 @@ readme = "../README.md" base64 = "0.10" byteorder = "1.0" bytes = "0.4" -fallible-iterator = "0.1" +fallible-iterator = "0.2" generic-array = "0.12" hmac = "0.7" md5 = "0.6" diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index bff0f6fd..211ae721 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -18,7 +18,7 @@ runtime = ["tokio-postgres/runtime", "tokio", "lazy_static", "log"] [dependencies] bytes = "0.4" -fallible-iterator = "0.1" +fallible-iterator = "0.2" futures = "0.1" tokio-postgres = { version = "0.4.0-rc.2", path = "../tokio-postgres", default-features = false } diff --git a/tokio-postgres/Cargo.toml b/tokio-postgres/Cargo.toml index 2914f8d7..bcdef6db 100644 --- a/tokio-postgres/Cargo.toml +++ b/tokio-postgres/Cargo.toml @@ -33,7 +33,7 @@ with-serde_json-1 = ["serde-1", "serde_json-1"] [dependencies] antidote = "1.0" bytes = "0.4" -fallible-iterator = "0.1.6" +fallible-iterator = "0.2" futures = "0.1.7" log = "0.4" percent-encoding = "1.0" diff --git a/tokio-postgres/src/proto/prepare.rs b/tokio-postgres/src/proto/prepare.rs index aa4739ec..029bbb8a 100644 --- a/tokio-postgres/src/proto/prepare.rs +++ b/tokio-postgres/src/proto/prepare.rs @@ -121,7 +121,7 @@ impl PollPrepare for Prepare { let columns = match message { Some(Message::RowDescription(body)) => body .fields() - .map(|f| (f.name().to_string(), f.type_oid())) + .map(|f| Ok((f.name().to_string(), f.type_oid()))) .collect() .map_err(Error::parse)?, Some(Message::NoData) => vec![], diff --git a/tokio-postgres/src/proto/simple_query.rs b/tokio-postgres/src/proto/simple_query.rs index 69d467b2..71f458a8 100644 --- a/tokio-postgres/src/proto/simple_query.rs +++ b/tokio-postgres/src/proto/simple_query.rs @@ -77,7 +77,7 @@ impl Stream for SimpleQueryStream { Some(Message::RowDescription(body)) => { let columns = body .fields() - .map(|f| f.name().to_string()) + .map(|f| Ok(f.name().to_string())) .collect::>() .map_err(Error::parse)? .into(); diff --git a/tokio-postgres/src/types/mod.rs b/tokio-postgres/src/types/mod.rs index 05cbab51..145a2530 100644 --- a/tokio-postgres/src/types/mod.rs +++ b/tokio-postgres/src/types/mod.rs @@ -354,7 +354,7 @@ impl<'a, T: FromSql<'a>> FromSql<'a> for Vec { array .values() - .and_then(|v| T::from_sql_nullable(member_type, v)) + .map(|v| T::from_sql_nullable(member_type, v)) .collect() } @@ -436,7 +436,7 @@ where raw: &'a [u8], ) -> Result, S>, Box> { types::hstore_from_sql(raw)? - .map(|(k, v)| (k.to_owned(), v.map(str::to_owned))) + .map(|(k, v)| Ok((k.to_owned(), v.map(str::to_owned)))) .collect() }