Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

refactor: remove I from impl_for_with_lifetimes#40

Merged
VictorKoenders merged 1 commit intobincode-org:trunkfrom
Daniel-Aaron-Bloom:refactor-iter
Mar 30, 2023
Merged

refactor: remove I from impl_for_with_lifetimes#40
VictorKoenders merged 1 commit intobincode-org:trunkfrom
Daniel-Aaron-Bloom:refactor-iter

Conversation

@Daniel-Aaron-Bloom
Copy link
Contributor

The I generic is unnecessary since Item is an associated type and cannot be specified independently of ITER. I think this is technically a breaking change for anyone explicitly naming all the generic parameters. That said, probably nobody is doing that because these are generic for convenience and ergonomics, not explicit typing. Honestly I would probably just turn both args into impl Trait params, but that may just be me.

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05 ⚠️

Comparison is base (04567e9) 39.94% compared to head (09871e1) 39.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk      #40      +/-   ##
==========================================
- Coverage   39.94%   39.90%   -0.05%     
==========================================
  Files          19       19              
  Lines        1860     1852       -8     
==========================================
- Hits          743      739       -4     
+ Misses       1117     1113       -4     
Impacted Files Coverage Δ
src/generate/generator.rs 0.00% <0.00%> (ø)
src/generate/impl_for.rs 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@VictorKoenders
Copy link
Contributor

This is indeed a breaking change, especially if someone does impl_for_with_lifetimes<_, _, SomeType>

That being said we're on 0.0.11 so we're still allowed to make breaking changes in every release, this seems an easy fix for users, and it makes the code cleaner

@VictorKoenders VictorKoenders merged commit b0fb7f5 into bincode-org:trunk Mar 30, 2023
@Daniel-Aaron-Bloom Daniel-Aaron-Bloom deleted the refactor-iter branch March 30, 2023 07:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants