Skip to content

Commit 73d35e7

Browse files
jplattemehcode
authored andcommitted
Remove Self: Type bounds in Encode / Decode implementations
1 parent 81ae756 commit 73d35e7

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

sqlx-core/src/postgres/types/array.rs

-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ impl<'q, T> Encode<'q, Postgres> for Vec<T>
3737
where
3838
for<'a> &'a [T]: Encode<'q, Postgres>,
3939
T: Encode<'q, Postgres>,
40-
Self: Type<Postgres>,
4140
{
4241
#[inline]
4342
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull {
@@ -48,7 +47,6 @@ where
4847
impl<'q, T> Encode<'q, Postgres> for &'_ [T]
4948
where
5049
T: Encode<'q, Postgres> + Type<Postgres>,
51-
Self: Type<Postgres>,
5250
{
5351
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull {
5452
buf.extend(&1_i32.to_be_bytes()); // number of dimensions
@@ -77,7 +75,6 @@ where
7775
impl<'r, T> Decode<'r, Postgres> for Vec<T>
7876
where
7977
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
80-
Self: Type<Postgres>,
8178
{
8279
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError> {
8380
let element_type_info;

sqlx-core/src/types/json.rs

-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ where
8686

8787
impl<'q, DB> Encode<'q, DB> for JsonValue
8888
where
89-
Self: Type<DB>,
9089
for<'a> Json<&'a Self>: Encode<'q, DB>,
9190
DB: Database,
9291
{
@@ -97,7 +96,6 @@ where
9796

9897
impl<'r, DB> Decode<'r, DB> for JsonValue
9998
where
100-
Self: Type<DB>,
10199
Json<Self>: Decode<'r, DB>,
102100
DB: Database,
103101
{
@@ -124,7 +122,6 @@ where
124122
// implementation for Encode
125123
impl<'r, DB> Decode<'r, DB> for &'r JsonRawValue
126124
where
127-
Self: Type<DB>,
128125
Json<Self>: Decode<'r, DB>,
129126
DB: Database,
130127
{

0 commit comments

Comments
 (0)