Skip to content

Commit 7328f51

Browse files
committed
fix: remove useless trait bound
1 parent 1a31aee commit 7328f51

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

libdd-trace-utils/src/span/trace_utils.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const PARTIAL_VERSION_KEY: &str = "_dd.partial_version";
1616
fn set_top_level_span<T>(span: &mut Span<T>)
1717
where
1818
T: TraceData,
19-
T::Text: std::borrow::Borrow<str>,
2019
{
2120
span.metrics
2221
.insert(T::Text::from_static_str(TOP_LEVEL_KEY), 1.0);
@@ -31,7 +30,6 @@ where
3130
pub fn compute_top_level_span<T>(trace: &mut [Span<T>])
3231
where
3332
T: TraceData,
34-
T::Text: std::borrow::Borrow<str>,
3533
{
3634
let mut span_id_idx: HashMap<u64, usize> = HashMap::new();
3735
for (i, span) in trace.iter().enumerate() {
@@ -59,21 +57,15 @@ where
5957
}
6058

6159
/// Return true if the span has a top level key set
62-
pub fn has_top_level<T: TraceData>(span: &Span<T>) -> bool
63-
where
64-
T::Text: std::borrow::Borrow<str>,
65-
{
60+
pub fn has_top_level<T: TraceData>(span: &Span<T>) -> bool {
6661
span.metrics
6762
.get(TRACER_TOP_LEVEL_KEY)
6863
.is_some_and(|v| *v == 1.0)
6964
|| span.metrics.get(TOP_LEVEL_KEY).is_some_and(|v| *v == 1.0)
7065
}
7166

7267
/// Returns true if a span should be measured (i.e., it should get trace metrics calculated).
73-
pub fn is_measured<T: TraceData>(span: &Span<T>) -> bool
74-
where
75-
T::Text: std::borrow::Borrow<str>,
76-
{
68+
pub fn is_measured<T: TraceData>(span: &Span<T>) -> bool {
7769
span.metrics.get(MEASURED_KEY).is_some_and(|v| *v == 1.0)
7870
}
7971

@@ -82,10 +74,7 @@ where
8274
/// When incomplete, a partial snapshot has a metric _dd.partial_version which is a positive
8375
/// integer. The metric usually increases each time a new version of the same span is sent by
8476
/// the tracer
85-
pub fn is_partial_snapshot<T: TraceData>(span: &Span<T>) -> bool
86-
where
87-
T::Text: std::borrow::Borrow<str>,
88-
{
77+
pub fn is_partial_snapshot<T: TraceData>(span: &Span<T>) -> bool {
8978
span.metrics
9079
.get(PARTIAL_VERSION_KEY)
9180
.is_some_and(|v| *v >= 0.0)
@@ -114,7 +103,6 @@ const SAMPLING_ANALYTICS_RATE_KEY: &str = "_dd1.sr.eausr";
114103
pub fn drop_chunks<T>(traces: &mut Vec<Vec<Span<T>>>) -> DroppedP0Stats
115104
where
116105
T: TraceData,
117-
T::Text: std::borrow::Borrow<str>,
118106
{
119107
let mut dropped_p0_traces = 0;
120108
let mut dropped_p0_spans = 0;

0 commit comments

Comments
 (0)