Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Update tracing and fix Clippy warnings #107

Merged

Conversation

JohnTitor
Copy link
Contributor

1.56 Clippy has a weird bug that is related to macros or tracing items and it causes immoral warnings, like:

error: this looks like an `else {..}` but the `else` is missing
  --> conduit-router/src/lib.rs:70:11
   |
70 |     ) -> &mut Self {
   |           ^^^^^^^^^
   |
   = note: to remove this lint, add the missing `else` or add a new line before the next block
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting

It might be related to rust-lang/rust-clippy#6249, this resolves that issue by using 1.62, which is used by rustfmt CI.

Signed-off-by: Yuki Okushi [email protected]

@JohnTitor JohnTitor requested a review from Turbo87 November 21, 2022 07:48
@Turbo87
Copy link
Contributor

Turbo87 commented Nov 21, 2022

the thing I've always wondered about: if we use a clippy from a Rust version other than our MSRV does it suggest patterns that are only possible with the newer version? or does it parse the rust-version field and know what to suggest or not?

@JohnTitor
Copy link
Contributor Author

the thing I've always wondered about: if we use a clippy from a Rust version other than our MSRV does it suggest patterns that are only possible with the newer version? or does it parse the rust-version field and know what to suggest or not?

AFAIK Clippy works like the former, there's no functionality such as the latter. We have to explicitly ignore it when encountering it, but I guess it won't cause a major issue as this crate is passively-developed now and pinning versions should prevent warnings from increasing implicitly.

Copy link
Contributor

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable 👍

@JohnTitor JohnTitor merged commit 3c50f15 into conduit-rust:master Nov 21, 2022
@JohnTitor JohnTitor deleted the tracing-clippy-weird-relation branch November 21, 2022 12:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants