From 82523985d7c4f23f0d7e9ff00547632bcb44f5b4 Mon Sep 17 00:00:00 2001 From: Razvan Rotari Date: Tue, 2 Jul 2024 12:54:29 +0300 Subject: [PATCH] Remove unnecessary use statement --- opentelemetry-proto/src/proto.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/opentelemetry-proto/src/proto.rs b/opentelemetry-proto/src/proto.rs index a5f918ecc6..ba4038072f 100644 --- a/opentelemetry-proto/src/proto.rs +++ b/opentelemetry-proto/src/proto.rs @@ -1,5 +1,3 @@ -use serde::Deserialize; - /// provide serde support for proto traceIds and spanIds. /// Those are hex encoded strings in the jsons but they are byte arrays in the proto. /// See https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding for more details @@ -59,15 +57,15 @@ pub(crate) mod serializers { Ok(s) => s, Err(e) => return Err(e), // Handle the error or return it }; - + // Attempt to serialize the intValue field if let Err(e) = state.serialize_field("intValue", &i.to_string()) { return Err(e); // Handle the error or return it } - + // Finalize the struct serialization state.end() - }, + } Some(value) => value.serialize(serializer), None => serializer.serialize_none(), }, @@ -188,7 +186,7 @@ pub(crate) mod serializers { let s = value.to_string(); serializer.serialize_str(&s) } - + pub fn deserialize_string_to_i64<'de, D>(deserializer: D) -> Result where D: Deserializer<'de>,