diff --git a/src/types/mod.rs b/src/types/mod.rs index 72c36c5b..9fa8d952 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -553,7 +553,7 @@ pub enum IsNull { /// /// `ToSql` is implemented for `Vec` and `&[T]` where `T` implements `ToSql`, /// and corresponds to one-dimentional Postgres arrays with an index offset of -/// 0. +/// 1. pub trait ToSql: fmt::Debug { /// Converts the value of `self` into the binary format of the specified /// Postgres `Type`, writing it to `out`. @@ -648,7 +648,7 @@ impl<'a, T: ToSql> ToSql for &'a [T] { try!(w.write_u32::(member_type.oid())); try!(w.write_i32::(try!(downcast(self.len())))); - try!(w.write_i32::(0)); // index offset + try!(w.write_i32::(1)); // index offset let mut inner_buf = vec![]; for e in *self {