Skip to content

Commit

Permalink
chore: fix clippy::borrow_deref_ref warnings
Browse files Browse the repository at this point in the history
This fixes some relatively recent clippy lints.
  • Loading branch information
hawkw committed Sep 16, 2022
1 parent 5a141ea commit 3a193f3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/examples/futures-proxy-server.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion tracing-error/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,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
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ where
{
type Writer = &'a W;
fn make_writer(&'a self) -> Self::Writer {
&*self
self
}
}

Expand Down

0 comments on commit 3a193f3

Please sign in to comment.