Skip to content

Commit 7e7dded

Browse files
snfasdf
and
asdf
authored
Adding PgHasArrayType for &[u8;N] (#2634)
* Adding PgHasArrayType for &[u8;N] * cargo fmt --------- Co-authored-by: asdf <asdf@ethereum>
1 parent eae9484 commit 7e7dded

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sqlx-postgres/src/types/bytes.rs

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ impl PgHasArrayType for &'_ [u8] {
1616
}
1717
}
1818

19+
impl<const N: usize> PgHasArrayType for &'_ [u8; N] {
20+
fn array_type_info() -> PgTypeInfo {
21+
PgTypeInfo::BYTEA_ARRAY
22+
}
23+
}
24+
1925
impl PgHasArrayType for Vec<u8> {
2026
fn array_type_info() -> PgTypeInfo {
2127
<[&[u8]] as Type<Postgres>>::type_info()

0 commit comments

Comments
 (0)