Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix clippy::borrow_deref_ref lints #2277

Merged
merged 2 commits into from Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/examples/futures-proxy-server.rs
Expand Up @@ -86,7 +86,7 @@ pub struct Args {
server_addr: SocketAddr,
}

#[derive(PartialEq, Debug)]
#[derive(Eq, PartialEq, Debug)]
pub enum LogFormat {
Plain,
Json,
Expand Down
2 changes: 1 addition & 1 deletion tracing-attributes/src/expand.rs
Expand Up @@ -411,7 +411,7 @@ impl RecordType {
RecordType::Value
}
syn::Type::Reference(syn::TypeReference { elem, .. }) => {
RecordType::parse_from_ty(&*elem)
RecordType::parse_from_ty(elem)
}
_ => RecordType::Debug,
}
Expand Down
4 changes: 2 additions & 2 deletions tracing-core/src/dispatch.rs
Expand Up @@ -804,7 +804,7 @@ impl Dispatch {
/// `T`.
#[inline]
pub fn is<T: Any>(&self) -> bool {
<dyn Collect>::is::<T>(&*self.collector())
<dyn Collect>::is::<T>(self.collector())
}

/// Returns some reference to the [`Collect`] this `Dispatch` forwards to
Expand All @@ -813,7 +813,7 @@ impl Dispatch {
/// [`Collect`]: super::collect::Collect
#[inline]
pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
<dyn Collect>::downcast_ref(&*self.collector())
<dyn Collect>::downcast_ref(self.collector())
}
}

Expand Down
2 changes: 1 addition & 1 deletion tracing-error/src/error.rs
Expand Up @@ -209,7 +209,7 @@ impl ErrorImpl<Erased> {
// uphold this is UB. since the `From` impl is parameterized over the original error type,
// the function pointer we construct here will also retain the original type. therefore,
// when this is consumed by the `error` method, it will be safe to call.
unsafe { &*(self.vtable.object_ref)(self) }
unsafe { (self.vtable.object_ref)(self) }
}
}

Expand Down