Skip to content

Commit

Permalink
Merge branch 'tokio-rs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nstinus authored Nov 4, 2022
2 parents 86bcfa7 + 68f830d commit 3ba6275
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 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-attributes/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn gen_block<B: ToTokens>(
.into_iter()
.flat_map(|param| match param {
FnArg::Typed(PatType { pat, ty, .. }) => {
param_names(*pat, RecordType::parse_from_ty(&*ty))
param_names(*pat, RecordType::parse_from_ty(&ty))
}
FnArg::Receiver(_) => Box::new(iter::once((
Ident::new("self", param.span()),
Expand Down
2 changes: 1 addition & 1 deletion tracing-core/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ pub fn get_current<T>(f: impl FnOnce(&Dispatch) -> T) -> Option<T> {
CURRENT_STATE
.try_with(|state| {
let entered = state.enter()?;
Some(f(&*entered.current()))
Some(f(&entered.current()))
})
.ok()?
}
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/benches/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl MultithreadedBench {
thread::spawn(move || {
let dispatch = this.dispatch.clone();
tracing::dispatch::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 @@ -681,7 +681,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
4 changes: 2 additions & 2 deletions tracing-subscriber/src/registry/sharded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl<'a> SpanData<'a> for Data<'a> {
}

fn metadata(&self) -> &'static Metadata<'static> {
(*self).inner.metadata
self.inner.metadata
}

fn parent(&self) -> Option<&Id> {
Expand Down Expand Up @@ -898,7 +898,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 @@ -1604,7 +1604,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(collector, || {
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(collector, || {
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 3ba6275

Please sign in to comment.