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

Bump MSRV to 1.42 and use subslices pattern #42

Merged
merged 5 commits into from
Apr 13, 2021
Merged

Conversation

natir
Copy link
Collaborator

@natir natir commented Apr 13, 2021

This pull request increase the minimal supported rust version to 1.42, because object one of our dependencies requires it.

But I'm also taking the opportunity to use the subslices pattern which are available since version 1.42. These changes mean that we no longer use the values associated with the Format enum, so I'm removing the enum_primitive dependency.

@natir natir marked this pull request as draft April 13, 2021 11:49
@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #42 (8250009) into master (a49b0d5) will decrease coverage by 0.71%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
- Coverage   94.92%   94.21%   -0.72%     
==========================================
  Files           9        9              
  Lines         394      380      -14     
==========================================
- Hits          374      358      -16     
- Misses         20       22       +2     
Impacted Files Coverage Δ
src/level.rs 97.22% <66.66%> (ø)
src/basic/compression.rs 100.00% <100.00%> (ø)
src/send/compression.rs 100.00% <100.00%> (ø)
src/send/mod.rs 98.75% <0.00%> (-1.25%) ⬇️
src/basic/mod.rs 98.75% <0.00%> (-1.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a49b0d5...8250009. Read the comment docs.

@natir natir changed the title Bump msrv1.42 Bump MSRV to 1.42 Apr 13, 2021
@natir natir changed the title Bump MSRV to 1.42 Bump MSRV to 1.42 and use subslices pattern Apr 13, 2021
@natir natir marked this pull request as ready for review April 13, 2021 15:00
@natir natir requested a review from luizirber April 13, 2021 15:01
@luizirber
Copy link
Owner

Nice! I added a commit to disable a clippy lint (that suggested we change an error name, which is a major version bump...), and then it triggered other 15 warnings related to returning a Result<Box<...>> when a Box<...> would suffice (since there is only one code path), but that is a false positive (because we do return an Err(FeatureDisabled) in another path of the macro...

So, I added a #![allow(clippy::unnecessary_wraps)] to src/send/compression.rs and src/basic/compression.rs.

The final clippy lint was for replacing the Into<u32> for Level and similar with From<Level> for u32 (because the Into impl comes for free if we implement the From trait).

@luizirber luizirber merged commit 3e09336 into master Apr 13, 2021
@luizirber luizirber deleted the bump_MSRV1.42 branch April 13, 2021 20:56
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