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?;