diff --git a/sqlx-core/src/postgres/types/bool.rs b/sqlx-core/src/postgres/types/bool.rs index 4deabfb82..ee1d1be29 100644 --- a/sqlx-core/src/postgres/types/bool.rs +++ b/sqlx-core/src/postgres/types/bool.rs @@ -19,9 +19,9 @@ impl Type for [bool] { PgTypeInfo::new(TypeId::ARRAY_BOOL, "BOOL[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[bool] as Type>::type_info() } } diff --git a/sqlx-core/src/postgres/types/float.rs b/sqlx-core/src/postgres/types/float.rs index 51614e397..f9abe6cb5 100644 --- a/sqlx-core/src/postgres/types/float.rs +++ b/sqlx-core/src/postgres/types/float.rs @@ -22,9 +22,9 @@ impl Type for [f32] { PgTypeInfo::new(TypeId::ARRAY_FLOAT4, "FLOAT4[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[f32] as Type>::type_info() } } @@ -58,9 +58,9 @@ impl Type for [f64] { PgTypeInfo::new(TypeId::ARRAY_FLOAT8, "FLOAT8[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[f64] as Type>::type_info() } } diff --git a/sqlx-core/src/postgres/types/int.rs b/sqlx-core/src/postgres/types/int.rs index 96cddc9b5..05ef1ce61 100644 --- a/sqlx-core/src/postgres/types/int.rs +++ b/sqlx-core/src/postgres/types/int.rs @@ -22,9 +22,9 @@ impl Type for [i16] { PgTypeInfo::new(TypeId::ARRAY_INT2, "INT2[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[i16] as Type>::type_info() } } @@ -54,9 +54,9 @@ impl Type for [i32] { PgTypeInfo::new(TypeId::ARRAY_INT4, "INT4[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[i32] as Type>::type_info() } } @@ -86,9 +86,9 @@ impl Type for [i64] { PgTypeInfo::new(TypeId::ARRAY_INT8, "INT8[]") } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { - >::type_info() + <[i64] as Type>::type_info() } } diff --git a/sqlx-core/src/postgres/types/str.rs b/sqlx-core/src/postgres/types/str.rs index 6012e594f..f9127f911 100644 --- a/sqlx-core/src/postgres/types/str.rs +++ b/sqlx-core/src/postgres/types/str.rs @@ -21,9 +21,10 @@ impl Type for [&'_ str] { PgTypeInfo::new(TypeId::ARRAY_TEXT, "TEXT[]") } } -impl HasSqlType> for Postgres { + +impl Type for Vec<&'_ str> { fn type_info() -> PgTypeInfo { - >::type_info() + <[&'_ str] as Type>::type_info() } } @@ -32,14 +33,16 @@ impl Type for String { >::type_info() } } -impl HasSqlType<[String]> for Postgres { + +impl Type for [String] { fn type_info() -> PgTypeInfo { - >::type_info() + <[&'_ str] as Type>::type_info() } } -impl HasSqlType> for Postgres { + +impl Type for Vec { fn type_info() -> PgTypeInfo { - >>::type_info() + as Type>::type_info() } } diff --git a/sqlx-core/src/postgres/types/uuid.rs b/sqlx-core/src/postgres/types/uuid.rs index a5aae9478..c9b14d17e 100644 --- a/sqlx-core/src/postgres/types/uuid.rs +++ b/sqlx-core/src/postgres/types/uuid.rs @@ -23,7 +23,7 @@ impl Type for [Uuid] { } } -impl HasSqlType> for Postgres { +impl Type for Vec { fn type_info() -> PgTypeInfo { >::type_info() }