We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d92cdb + aa566a3 commit ce6392eCopy full SHA for ce6392e
core/shared/src/main/scala/fs2/Stream.scala
@@ -3605,7 +3605,7 @@ object Stream extends StreamLowPriority {
3605
3606
def getNextChunk(i: Iterator[A]): F[Option[(Chunk[A], Iterator[A])]] =
3607
F.suspend(hint) {
3608
- for (_ <- 1 to chunkSize if i.hasNext) yield i.next()
+ i.take(chunkSize).toVector
3609
}.map { s =>
3610
if (s.isEmpty) None else Some((Chunk.from(s), i))
3611
}
0 commit comments