fix: impl Deserialize for Json for MySQL instead of DeserializeOwned

This commit is contained in:
Ryan Leckey 2020-06-19 01:42:05 -07:00
parent 90242494a8
commit 93728a051c

View file

@ -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)?;