Skip to content

Commit

Permalink
chore: fix clippy::borrow_deref_ref lints (tokio-rs#2277)
Browse files Browse the repository at this point in the history
This fixes new Clippy lints introduced in the latest Rust version.

* chore: fix `clippy::borrow_deref_ref` lints
* chore: fix `clippy::partial_eq_without_eq` lint
  • Loading branch information
hawkw authored and kaffarell committed May 22, 2024
1 parent 903b69f commit 84db72e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-core/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,14 +631,14 @@ impl Dispatch {
/// `T`.
#[inline]
pub fn is<T: Any>(&self) -> bool {
<dyn Subscriber>::is::<T>(&*self.subscriber)
<dyn Subscriber>::is::<T>(&self.subscriber)
}

/// Returns some reference to the `Subscriber` this `Dispatch` forwards to
/// if it is of type `T`, or `None` if it isn't.
#[inline]
pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
<dyn Subscriber>::downcast_ref(&*self.subscriber)
<dyn Subscriber>::downcast_ref(&self.subscriber)
}
}

Expand Down

0 comments on commit 84db72e

Please sign in to comment.