mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-10 12:16:30 +00:00
Fix CIDR[] not being compatible with Vec<IpNetwork> (#1433)
This commit is contained in:
@@ -38,6 +38,10 @@ impl Type<Postgres> for [IpNetwork] {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
PgTypeInfo::INET_ARRAY
|
||||
}
|
||||
|
||||
fn compatible(ty: &PgTypeInfo) -> bool {
|
||||
*ty == PgTypeInfo::CIDR_ARRAY || *ty == PgTypeInfo::INET_ARRAY
|
||||
}
|
||||
}
|
||||
|
||||
impl Type<Postgres> for Vec<IpNetwork> {
|
||||
|
||||
Reference in New Issue
Block a user