mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
fix: impl Deserialize for Json for MySQL instead of DeserializeOwned
This commit is contained in:
parent
90242494a8
commit
93728a051c
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
use serde::de::DeserializeOwned;
|
||||
use serde::Serialize;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::decode::Decode;
|
||||
use crate::encode::{Encode, IsNull};
|
||||
|
@ -37,7 +36,7 @@ where
|
|||
|
||||
impl<'r, T> Decode<'r, MySql> for Json<T>
|
||||
where
|
||||
T: 'r + DeserializeOwned,
|
||||
T: 'r + Deserialize<'r>,
|
||||
{
|
||||
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError> {
|
||||
let string_value = <&str as Decode<MySql>>::decode(value)?;
|
||||
|
|
Loading…
Reference in a new issue