Skip to content

Commit

Permalink
WIP: Address TracerPayload clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ekump committed Jul 15, 2024
1 parent d8799a4 commit a67c5ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions sidecar/src/service/sidecar_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use datadog_ipc::platform::{AsyncChannel, ShmHandle};
use datadog_ipc::tarpc;
use datadog_ipc::tarpc::context::Context;
use datadog_ipc::transport::Transport;
use datadog_trace_protobuf::pb;
use datadog_trace_utils::trace_utils::SendData;
use datadog_trace_utils::tracer_payload;
use datadog_trace_utils::tracer_payload::TraceEncoding;
Expand Down Expand Up @@ -313,8 +312,7 @@ impl SidecarServer {
error!(
"Failed to collect trace chunks from msgpack with error {:?}",
e
);
return;
)
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion trace-utils/src/tracer_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ impl TracerPayloadCollection {
}
}

pub type TracerPayloadChunkProcessor<'a> = Box<dyn Fn(&mut pb::TraceChunk, usize) + 'a>;

/// Represents the parameters required to collect trace chunks from msgpack data.
///
/// This struct encapsulates all the necessary parameters for converting msgpack data into
Expand All @@ -124,7 +126,7 @@ pub struct TracerPayloadParams<'a> {
tracer_header_tags: &'a TracerHeaderTags<'a>,
/// A boxed closure that processes each `TraceChunk`, allowing for custom logic to be applied
/// during the conversion process.
process_chunk: Box<dyn Fn(&mut pb::TraceChunk, usize) + 'a>,
process_chunk: TracerPayloadChunkProcessor<'a>,
/// A boolean indicating whether the agent is running in an agentless mode. This is used to
/// determine what protocol trace chunks should be serialized into when being sent.
is_agentless: bool,
Expand Down

0 comments on commit a67c5ed

Please sign in to comment.