Skip to content

Commit

Permalink
New Reader API
Browse files Browse the repository at this point in the history
  • Loading branch information
vkostyukov committed Nov 14, 2018
1 parent a130832 commit 45e4ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iteratee/src/main/scala/io/finch/iteratee/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package object iteratee extends IterateeInstances {
private[finch] def enumeratorFromReader[F[_] : Effect](reader: Reader[Buf]): Enumerator[F, Buf] = {
def rec(reader: Reader[Buf]): Enumerator[F, Buf] = {
Enumerator.liftM[F, Option[Buf]] {
futureToEffect(reader.read(Int.MaxValue))
futureToEffect(reader.read())
}.flatMap {
case None => Enumerator.empty[F, Buf]
case Some(buf) => Enumerator.enumOne[F, Buf](buf).append(rec(reader))
Expand Down

0 comments on commit 45e4ead

Please sign in to comment.