File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
- use serde:: Deserialize ;
2
-
3
1
/// provide serde support for proto traceIds and spanIds.
4
2
/// Those are hex encoded strings in the jsons but they are byte arrays in the proto.
5
3
/// See https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding for more details
@@ -59,15 +57,15 @@ pub(crate) mod serializers {
59
57
Ok ( s) => s,
60
58
Err ( e) => return Err ( e) , // Handle the error or return it
61
59
} ;
62
-
60
+
63
61
// Attempt to serialize the intValue field
64
62
if let Err ( e) = state. serialize_field ( "intValue" , & i. to_string ( ) ) {
65
63
return Err ( e) ; // Handle the error or return it
66
64
}
67
-
65
+
68
66
// Finalize the struct serialization
69
67
state. end ( )
70
- } ,
68
+ }
71
69
Some ( value) => value. serialize ( serializer) ,
72
70
None => serializer. serialize_none ( ) ,
73
71
} ,
@@ -188,7 +186,7 @@ pub(crate) mod serializers {
188
186
let s = value. to_string ( ) ;
189
187
serializer. serialize_str ( & s)
190
188
}
191
-
189
+
192
190
pub fn deserialize_string_to_i64 < ' de , D > ( deserializer : D ) -> Result < i64 , D :: Error >
193
191
where
194
192
D : Deserializer < ' de > ,
You can’t perform that action at this time.
0 commit comments