Skip to content

Commit

Permalink
chore: track Rust 1.65 clippy lints (#2366)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Apr 21, 2023
1 parent b38122d commit 77257c1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blacklisted-names = []
disallowed-names = []
cognitive-complexity-threshold = 100
too-many-arguments-threshold = 8
type-complexity-threshold = 375
2 changes: 1 addition & 1 deletion tracing-subscriber/benches/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl MultithreadedBench {
thread::spawn(move || {
let dispatch = this.dispatch.clone();
tracing::dispatcher::with_default(&dispatch, move || {
f(&*this.start);
f(&this.start);
this.end.wait();
})
});
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/format/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ mod test {
);

let span = tracing::info_span!("the span", na = tracing::field::Empty);
span.record("na", &"value");
span.record("na", "value");
let _enter = span.enter();

tracing::info!("an event inside the root span");
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/registry/sharded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ mod tests {

drop(span3);

state.assert_closed_in_order(&["child", "parent", "grandparent"]);
state.assert_closed_in_order(["child", "parent", "grandparent"]);
});
}
}
2 changes: 1 addition & 1 deletion tracing-subscriber/tests/field_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn record_after_created() {
tracing::debug!("i'm disabled!");
});

span.record("enabled", &true);
span.record("enabled", true);
span.in_scope(|| {
tracing::debug!("i'm enabled!");
});
Expand Down
4 changes: 2 additions & 2 deletions tracing/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ mod test {

#[test]
fn test_record_backwards_compat() {
Span::current().record("some-key", &"some text");
Span::current().record("some-key", &false);
Span::current().record("some-key", "some text");
Span::current().record("some-key", false);
}
}
6 changes: 3 additions & 3 deletions tracing/tests/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ fn record_new_value_for_field() {

with_default(subscriber, || {
let span = tracing::span!(Level::TRACE, "foo", bar = 5, baz = false);
span.record("baz", &true);
span.record("baz", true);
span.in_scope(|| {})
});

Expand Down Expand Up @@ -598,8 +598,8 @@ fn record_new_values_for_fields() {

with_default(subscriber, || {
let span = tracing::span!(Level::TRACE, "foo", bar = 4, baz = false);
span.record("bar", &5);
span.record("baz", &true);
span.record("bar", 5);
span.record("baz", true);
span.in_scope(|| {})
});

Expand Down

0 comments on commit 77257c1

Please sign in to comment.