Skip to content

Commit

Permalink
Lint: fix issues with unnecessary wraps (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozerovandrei authored Feb 14, 2021
1 parent 238e797 commit f79586b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
4 changes: 1 addition & 3 deletions opentelemetry-datadog/src/exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mod tests {
use crate::exporter::model::tests::get_span;

#[test]
fn test_out_of_order_group() -> Result<(), Box<dyn std::error::Error>> {
fn test_out_of_order_group() {
let batch = vec![get_span(1, 1, 1), get_span(2, 2, 2), get_span(1, 1, 3)];
let expected = vec![
vec![get_span(1, 1, 1), get_span(1, 1, 3)],
Expand All @@ -204,7 +204,5 @@ mod tests {
traces.sort_by_key(|t| t[0].span_context.trace_id().to_u128());

assert_eq!(traces, expected);

Ok(())
}
}
3 changes: 1 addition & 2 deletions opentelemetry-jaeger/src/exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ mod tests {
}

#[test]
fn test_set_status() -> Result<(), Box<dyn std::error::Error>> {
fn test_set_status() {
for (status_code, error_msg, status_tag_val, msg_tag_val) in get_error_tag_test_data() {
let tags = build_span_tags(
EvictedHashMap::new(20, 20),
Expand All @@ -803,6 +803,5 @@ mod tests {
assert_tag_not_contains(tags.clone(), OTEL_STATUS_DESCRIPTION);
}
}
Ok(())
}
}
4 changes: 1 addition & 3 deletions opentelemetry-otlp/src/transform/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ mod tests {
}

#[test]
fn test_sink() -> Result<(), MetricsError> {
fn test_sink() {
let test_data: Vec<(ResourceWrapper, InstrumentationLibrary, Metric)> = vec![
(
vec![("runtime", "tokio")],
Expand Down Expand Up @@ -826,8 +826,6 @@ mod tests {
for (expect, actual) in expect.into_iter().zip(actual.into_iter()) {
assert_resource_metrics(expect, actual);
}

Ok(())
}
}
}
4 changes: 1 addition & 3 deletions opentelemetry-zipkin/src/exporter/model/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ mod tests {
}

#[test]
fn test_set_status() -> Result<(), Box<dyn std::error::Error>> {
fn test_set_status() {
for (status_code, status_msg, status_tag_val, status_msg_tag_val) in
get_set_status_test_data()
{
Expand Down Expand Up @@ -188,7 +188,5 @@ mod tests {
assert_tag_contains(tags, OTEL_ERROR_DESCRIPTION, status_msg_tag_val);
};
}

Ok(())
}
}

0 comments on commit f79586b

Please sign in to comment.