We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92be2db commit 3bb055aCopy full SHA for 3bb055a
1 file changed
src/types/mod.rs
@@ -553,7 +553,7 @@ pub enum IsNull {
553
///
554
/// `ToSql` is implemented for `Vec<T>` and `&[T]` where `T` implements `ToSql`,
555
/// and corresponds to one-dimentional Postgres arrays with an index offset of
556
-/// 0.
+/// 1.
557
pub trait ToSql: fmt::Debug {
558
/// Converts the value of `self` into the binary format of the specified
559
/// Postgres `Type`, writing it to `out`.
@@ -648,7 +648,7 @@ impl<'a, T: ToSql> ToSql for &'a [T] {
648
try!(w.write_u32::<BigEndian>(member_type.oid()));
649
650
try!(w.write_i32::<BigEndian>(try!(downcast(self.len()))));
651
- try!(w.write_i32::<BigEndian>(0)); // index offset
+ try!(w.write_i32::<BigEndian>(1)); // index offset
652
653
let mut inner_buf = vec![];
654
for e in *self {
0 commit comments