-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iterator): ensure HasNext does not advance state
- Refactored bufferedIterator to make HasNext idempotent. - Added peek logic to prefetch the next valid node without advancing. - Updated HasNext and Next to align with the expected behavior in docs. - Added test cases to verify HasNext idempotency and empty iterator behavior. Signed-off-by: Pavel Larkin <[email protected]>
- Loading branch information
Showing
2 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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