Skip to content

Commit

Permalink
fix: remove the clone on Encode for JsonValue
Browse files Browse the repository at this point in the history
  • Loading branch information
mehcode committed Apr 19, 2020
1 parent 1b04829 commit 1cdfb85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlx-core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ pub mod json {

impl<DB> Encode<DB> for JsonValue
where
Json<Self>: Encode<DB>,
for<'a> Json<&'a Self>: Encode<DB>,
DB: Database,
{
fn encode(&self, buf: &mut DB::RawBuffer) {
<Json<Self> as Encode<DB>>::encode(&Json(self.clone()), buf)
<Json<&Self> as Encode<DB>>::encode(&Json(self), buf)
}
}

Expand Down

0 comments on commit 1cdfb85

Please sign in to comment.