Skip to content

Commit

Permalink
Fix cancellation not being forwarded to split
Browse files Browse the repository at this point in the history
Closes #109.
  • Loading branch information
trowski committed Feb 17, 2024
1 parent 0a4b0e8 commit a868219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function split(ReadableStream $source, string $delimiter, ?Cancellation $cancell
*/
function splitLines(ReadableStream $source, ?Cancellation $cancellation = null): \Traversable
{
foreach (split($source, "\n") as $line) {
foreach (split($source, "\n", $cancellation) as $line) {
yield \rtrim($line, "\r");
}
}
Expand Down

0 comments on commit a868219

Please sign in to comment.