Skip to content

Commit

Permalink
feat: implement Encode,Decode,Type for Arc<str> and Arc<[u8]>
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydewaal committed Jan 12, 2025
1 parent 37ecab1 commit 68c427c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions sqlx-postgres/src/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,6 @@ where
}
}

impl<T> Type<Postgres> for Arc<[T]>
where
T: PgHasArrayType,
{
fn type_info() -> PgTypeInfo {
T::array_type_info()
}

fn compatible(ty: &PgTypeInfo) -> bool {
T::array_compatible(ty)
}
}

impl<'q, T> Encode<'q, Postgres> for Vec<T>
where
for<'a> &'a [T]: Encode<'q, Postgres>,
Expand Down
10 changes: 0 additions & 10 deletions sqlx-postgres/src/types/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ impl Type<Postgres> for String {
}
}

impl Type<Postgres> for Arc<str> {
fn type_info() -> PgTypeInfo {
<&str as Type<Postgres>>::type_info()
}

fn compatible(ty: &PgTypeInfo) -> bool {
<&str as Type<Postgres>>::compatible(ty)
}
}

impl PgHasArrayType for &'_ str {
fn array_type_info() -> PgTypeInfo {
PgTypeInfo::TEXT_ARRAY
Expand Down

0 comments on commit 68c427c

Please sign in to comment.