Skip to content

Commit

Permalink
PredicateTruncateIterator: avoid unecessary recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Jan 2, 2025
1 parent 1df84dc commit cab1951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion streamable/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def __next__(self):
elem = next(self.iterator)
if self.when(elem):
self._satisfied = True
return next(self)
raise StopIteration()
return elem


Expand Down

0 comments on commit cab1951

Please sign in to comment.