File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ where
2828 }
2929}
3030
31- impl < ' r , T > Decode < ' _ , Any > for Json < T >
31+ impl < T > Decode < ' _ , Any > for Json < T >
3232where
3333 T : for < ' de > Deserialize < ' de > ,
3434{
3535 fn decode ( value : AnyValueRef < ' _ > ) -> Result < Self , BoxDynError > {
3636 match value. kind {
37- AnyValueKind :: Text ( text) => Json :: decode_from_string ( & text. into_owned ( ) ) ,
38- AnyValueKind :: Blob ( blob) => Json :: decode_from_bytes ( & blob. into_owned ( ) ) ,
37+ AnyValueKind :: Text ( text) => Json :: decode_from_string ( & text) ,
38+ AnyValueKind :: Blob ( blob) => Json :: decode_from_bytes ( & blob) ,
3939 other => other. unexpected ( ) ,
4040 }
4141 }
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ fn test_type_impls() {
5151 // These imply that there are also impls for the equivalent slice types.
5252 has_type :: < Vec < u8 > > ( ) ;
5353 has_type :: < String > ( ) ;
54-
54+
5555 // JSON types
5656 has_type :: < crate :: types:: Json < serde_json:: Value > > ( ) ;
5757}
You can’t perform that action at this time.
0 commit comments