Skip to content

Commit

Permalink
chore: fix clippy::borrow_deref_ref lints (#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 committed Sep 19, 2022
1 parent 10a4b13 commit 1413f04
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 1413f04

Please sign in to comment.