diff --git a/Cargo.toml b/Cargo.toml index 91e44c3..b0f912b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "postgres_array" -version = "0.7.1" +version = "0.8.0" authors = ["Steven Fackler "] license = "MIT" description = "Array support for rust-postgres" repository = "https://github.com/sfackler/rust-postgres-array" -documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.7.1/postgres_array" +documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.8.0/postgres_array" [dependencies] fallible-iterator = "0.1" -postgres = ">= 0.12, < 0.14" -postgres-protocol = "0.1" +postgres = "0.14" +postgres-protocol = "0.3" diff --git a/src/impls.rs b/src/impls.rs index 6eda63a..ad05c2e 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -1,5 +1,5 @@ use fallible_iterator::FallibleIterator; -use postgres::types::{Type, Kind, ToSql, FromSql, IsNull, SessionInfo}; +use postgres::types::{Type, Kind, ToSql, FromSql, IsNull}; use postgres_protocol::types; use postgres_protocol; use std::error::Error; @@ -9,7 +9,7 @@ use {Array, Dimension}; impl FromSql for Array where T: FromSql { - fn from_sql(ty: &Type, raw: &[u8], info: &SessionInfo) -> Result, Box> { + fn from_sql(ty: &Type, raw: &[u8]) -> Result, Box> { let element_type = match *ty.kind() { Kind::Array(ref ty) => ty, _ => unreachable!(), @@ -24,7 +24,7 @@ impl FromSql for Array .collect()); let elements = try!(array.values() - .and_then(|v| FromSql::from_sql_nullable(element_type, v, info)) + .and_then(|v| FromSql::from_sql_nullable(element_type, v)) .collect()); Ok(Array::from_parts(elements, dimensions)) @@ -41,7 +41,7 @@ impl FromSql for Array impl ToSql for Array where T: ToSql { - fn to_sql(&self, ty: &Type, w: &mut Vec, info: &SessionInfo) -> Result> { + fn to_sql(&self, ty: &Type, w: &mut Vec) -> Result> { let element_type = match ty.kind() { &Kind::Array(ref ty) => ty, _ => unreachable!(), @@ -62,7 +62,7 @@ impl ToSql for Array element_type.oid(), elements, |v, w| { - match v.to_sql(element_type, w, info) { + match v.to_sql(element_type, w) { Ok(IsNull::Yes) => Ok(postgres_protocol::IsNull::Yes), Ok(IsNull::No) => Ok(postgres_protocol::IsNull::No), Err(e) => Err(e),