Skip to content

Commit 8df4a17

Browse files
committed
subscriber: fix clippy lints (tokio-rs#2191)
This fixes a Clippy lint for explicitly calling `drop` on a value without a `Drop` impl, and a lint for `let` bindings whose value is `()`. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
1 parent 7a9e1e4 commit 8df4a17

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

tracing-opentelemetry/benches/trace.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ where
7575
let span = ctx.span(&id).expect("Span not found, this is a bug");
7676
let mut extensions = span.extensions_mut();
7777

78-
if let Some(no_data) = extensions.remove::<NoDataSpan>() {
79-
drop(no_data)
80-
}
78+
extensions.remove::<NoDataSpan>();
8179
}
8280
}
8381

tracing-subscriber/src/subscribe/layered.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ where
437437
// (rather than calling into the inner type), clear the current
438438
// per-layer filter interest state.
439439
#[cfg(feature = "registry")]
440-
drop(filter::FilterState::take_interest());
440+
filter::FilterState::take_interest();
441441

442442
return outer;
443443
}

tracing-subscriber/tests/registry_with_subscriber.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use tracing_subscriber::prelude::*;
44

55
#[tokio::test]
66
async fn future_with_subscriber() {
7-
let _default = tracing_subscriber::registry().init();
7+
tracing_subscriber::registry().init();
88
let span = tracing::info_span!("foo");
99
let _e = span.enter();
1010
let span = tracing::info_span!("bar");

0 commit comments

Comments
 (0)