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

rust: appease compiler, formatter and linter from toolchain 1.83 #1136

Merged
merged 7 commits into from
Dec 2, 2024

Conversation

muzarski
Copy link
Contributor

@muzarski muzarski commented Dec 2, 2024

This PR fixes CI, by fixing the:

  • formatting errors - some changes to cargo fmt were introduced in 1.83
  • compiler warnings - these are regarding elision of lifetimes that are already declared
  • clippy lints

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • [ ] I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • [ ] I added appropriate Fixes: annotations to PR description.

The warnings are regarding elision of named lifetimes.
See: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

I applied the suggestion in places where we only use one lifetime.

However, I disabled the lint in places where there is more than one
lifetime. I believe, that having the lifetime explicit if there are many
of them aids readability and makes the code easier to understand.

There is a tracking issue for configuration of the lint.
See: rust-lang/rust-clippy#12495
The lifetime was not used at all. The clippy complained about it (as it should).
@muzarski muzarski self-assigned this Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

cargo semver-checks found no API-breaking changes in this PR! 🎉🥳
Checked commit: 9639b99

@wprzytula wprzytula merged commit 49c342e into scylladb:main Dec 2, 2024
11 checks passed
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this pull request Dec 11, 2024
rust: appease compiler, formatter and linter from toolchain 1.83
(cherry picked from commit 49c342e)
@wprzytula wprzytula mentioned this pull request Dec 11, 2024
@muzarski muzarski deleted the clippy-1.83 branch December 19, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants