chore: Implement FusedIterator and size_hint for the shp iterators - #325
Open
CommanderStorm wants to merge 2 commits into
Open
chore: Implement FusedIterator and size_hint for the shp iterators#325CommanderStorm wants to merge 2 commits into
FusedIterator and size_hint for the shp iterators#325CommanderStorm wants to merge 2 commits into
Conversation
michaelkirk
requested changes
Aug 1, 2026
michaelkirk
left a comment
Member
There was a problem hiding this comment.
Looks mostly good - but I was confused by one part.
| } | ||
| let (shapes_lower, shapes_upper) = self.shape_iter.size_hint(); | ||
| let num_records = self.dbf_reader.header().num_records as usize; | ||
| // Reading past the last dbf record yields one final error item |
Member
There was a problem hiding this comment.
I'm a little confused by this comment - but assume it's related to the saturating_add(1)? Can you add a test for this code path?
Collaborator
Author
There was a problem hiding this comment.
Yea, was an halucination, I did not yet fully clean up the PR when you reviewed it
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CommanderStorm
force-pushed
the
iterator-traits
branch
from
August 1, 2026 00:51
302195c to
61e731f
Compare
FusedIterator and size_hint for the shp iterators
clippy::manual_midpoint is pedantic-level and CI runs clippy with -D warnings, so the manual (a + b) / 2 broke the docs job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0111ASd1ug96t8CixgGsaoHL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also
impl ExactSizeIterator + FusedIteratorfor the iterators that can.ALso add
size_hintfor the things that need