Adding PgHasArrayType for &[u8;N] (#2634)

* Adding PgHasArrayType for &[u8;N]

* cargo fmt

---------

Co-authored-by: asdf <asdf@ethereum>
This commit is contained in:
Sebastian N. Fernandez 2023-07-25 00:10:42 +01:00 committed by GitHub
parent eae9484710
commit 7e7dded8af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,12 @@ impl PgHasArrayType for &'_ [u8] {
}
}
impl<const N: usize> PgHasArrayType for &'_ [u8; N] {
fn array_type_info() -> PgTypeInfo {
PgTypeInfo::BYTEA_ARRAY
}
}
impl PgHasArrayType for Vec<u8> {
fn array_type_info() -> PgTypeInfo {
<[&[u8]] as Type<Postgres>>::type_info()