Skip to content

Lint: fix issues with unnecessary wraps #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions opentelemetry-datadog/src/exporter/mod.rs
Original file line number Diff line number Diff line change
@@ -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)],
@@ -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
@@ -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),
@@ -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
@@ -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")],
@@ -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
@@ -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()
{
@@ -188,7 +188,5 @@ mod tests {
assert_tag_contains(tags, OTEL_ERROR_DESCRIPTION, status_msg_tag_val);
};
}

Ok(())
}
}