From ec27b65b26cd58bc24c463486772d8621e10a06d Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Fri, 20 Mar 2020 20:07:52 -0700 Subject: [PATCH] postgres: change types in macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Oliver Bøving --- sqlx-core/src/postgres/types/raw/array.rs | 2 +- tests/postgres-macros.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-core/src/postgres/types/raw/array.rs b/sqlx-core/src/postgres/types/raw/array.rs index 9356fa94..e5fe0465 100644 --- a/sqlx-core/src/postgres/types/raw/array.rs +++ b/sqlx-core/src/postgres/types/raw/array.rs @@ -56,7 +56,7 @@ where let el_len_index = self.buf.len(); self.buf.put_i32::(0); - // Allocate the element it self + // Allocate and encode the element it self let el_start = self.buf.len(); if let IsNull::Yes = Encode::::encode_nullable(&item, self.buf) { diff --git a/tests/postgres-macros.rs b/tests/postgres-macros.rs index bcea189d..adf71b96 100644 --- a/tests/postgres-macros.rs +++ b/tests/postgres-macros.rs @@ -193,7 +193,7 @@ async fn test_array_from_slice() -> anyhow::Result<()> { let list: &[i32] = &[1, 2, 3, 4i32]; - let result = sqlx::query!("SELECT $1::int[] as my_array", *list) + let result = sqlx::query!("SELECT $1::int[] as my_array", list) .fetch_one(&mut conn) .await?;