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

Adds #![deny(rust_2018_idioms)], applies lifetime elision suggestions #861

Merged
merged 7 commits into from
Dec 2, 2024

Conversation

zslayton
Copy link
Contributor

@zslayton zslayton commented Nov 29, 2024

Issue #, if available: #859

Description of changes:

Adds #![deny(rust_2018_idioms)] at the crate level, disallowing elided anonymous lifetimes and unnecessary trait lifetime qualifications. Also applies lots of new clippy suggestions around lifetime elisions in trait implementations.

There are no logic changes, only mechanical lint suggestion fixes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 92.68293% with 15 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (4e7431f) to head (482e1d9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lazy/text/parse_result.rs 37.50% 5 Missing ⚠️
src/lazy/expanded/compiler.rs 90.90% 3 Missing ⚠️
src/lazy/binary/raw/v1_1/value.rs 0.00% 0 Missing and 2 partials ⚠️
src/lazy/encoder/binary/v1_1/flex_uint.rs 50.00% 1 Missing ⚠️
src/lazy/encoder/write_as_ion.rs 0.00% 1 Missing ⚠️
src/lazy/streaming_raw_reader.rs 80.00% 0 Missing and 1 partial ⚠️
src/lazy/system_reader.rs 90.00% 1 Missing ⚠️
src/types/struct.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
+ Coverage   77.81%   77.83%   +0.01%     
==========================================
  Files         136      136              
  Lines       33984    34021      +37     
  Branches    33984    34021      +37     
==========================================
+ Hits        26446    26479      +33     
- Misses       5598     5602       +4     
  Partials     1940     1940              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zslayton zslayton changed the title Adds # Adds #![deny(rust_2018_idioms)], applies lifetime elision suggestions Nov 29, 2024
Comment on lines -341 to +342
/* 0 */ TemplateBodyExpr::element(
/* 0 */
TemplateBodyExpr::element(
Copy link
Contributor

Choose a reason for hiding this comment

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

You can feel free to remove these if you like, I added them to help me keep track of all the indices but perhaps they are unnecessary.... one can track the left hand side of the ExprRange arguments instead.

@zslayton zslayton merged commit 137d79e into main Dec 2, 2024
35 checks passed
@zslayton zslayton deleted the deny-old-idioms branch December 2, 2024 19:08
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