File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ impl<S, T> Serde<T> for S where S: Serializer<T> + Deserializer<T> {}
4545/// Implements the [Serde] trait to translate between two different types,
4646/// and using the specified [Serde] for serialization and deserialization
4747/// using the new `Out` type.
48- #[ derive( Clone ) ]
48+ #[ derive( Clone , Copy ) ]
4949pub struct Convert < In , Out , S >
5050where
5151 In : Send + Sync ,
@@ -183,24 +183,12 @@ where
183183/// as wire protocol.
184184#[ cfg( feature = "serde-prost" ) ]
185185#[ cfg( feature = "serde-json" ) ]
186- #[ derive( Clone , Copy ) ]
186+ #[ derive( Clone , Copy , Default ) ]
187187pub struct ProtoJson < T > ( PhantomData < T > )
188188where
189189 T : prost:: Message + Serialize + Default ,
190190 for < ' de > T : Deserialize < ' de > ;
191191
192- #[ cfg( feature = "serde-prost" ) ]
193- #[ cfg( feature = "serde-json" ) ]
194- impl < T > Default for ProtoJson < T >
195- where
196- T : prost:: Message + Serialize + Default ,
197- for < ' de > T : Deserialize < ' de > ,
198- {
199- fn default ( ) -> Self {
200- Self ( PhantomData )
201- }
202- }
203-
204192#[ cfg( feature = "serde-prost" ) ]
205193#[ cfg( feature = "serde-json" ) ]
206194impl < T > Serializer < T > for ProtoJson < T >
You can’t perform that action at this time.
0 commit comments