Skip to content

Commit

Permalink
Remove Self: Type bounds in Encode / Decode implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte authored and mehcode committed Apr 16, 2021
1 parent 81ae756 commit 73d35e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions sqlx-core/src/postgres/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ impl<'q, T> Encode<'q, Postgres> for Vec<T>
where
for<'a> &'a [T]: Encode<'q, Postgres>,
T: Encode<'q, Postgres>,
Self: Type<Postgres>,
{
#[inline]
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull {
Expand All @@ -48,7 +47,6 @@ where
impl<'q, T> Encode<'q, Postgres> for &'_ [T]
where
T: Encode<'q, Postgres> + Type<Postgres>,
Self: Type<Postgres>,
{
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull {
buf.extend(&1_i32.to_be_bytes()); // number of dimensions
Expand Down Expand Up @@ -77,7 +75,6 @@ where
impl<'r, T> Decode<'r, Postgres> for Vec<T>
where
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
Self: Type<Postgres>,
{
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError> {
let element_type_info;
Expand Down
3 changes: 0 additions & 3 deletions sqlx-core/src/types/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ where

impl<'q, DB> Encode<'q, DB> for JsonValue
where
Self: Type<DB>,
for<'a> Json<&'a Self>: Encode<'q, DB>,
DB: Database,
{
Expand All @@ -97,7 +96,6 @@ where

impl<'r, DB> Decode<'r, DB> for JsonValue
where
Self: Type<DB>,
Json<Self>: Decode<'r, DB>,
DB: Database,
{
Expand All @@ -124,7 +122,6 @@ where
// implementation for Encode
impl<'r, DB> Decode<'r, DB> for &'r JsonRawValue
where
Self: Type<DB>,
Json<Self>: Decode<'r, DB>,
DB: Database,
{
Expand Down

0 comments on commit 73d35e7

Please sign in to comment.