Skip to content

Commit

Permalink
Fix documentation example
Browse files Browse the repository at this point in the history
As per https://gitter.im/functional-streams-for-scala/fs2?at=5a778d38e217167e2c40cc1a the old code doesn't work with 0.10.0

Passes `sbt microsite/makeMicrosite`
  • Loading branch information
pvillega committed Feb 5, 2018
1 parent 762e3b3 commit 52db296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/src/guide.md
Expand Up @@ -517,7 +517,7 @@ trait CSVHandle {
def rows[F[_]](h: CSVHandle)(implicit F: Effect[F], ec: ExecutionContext): Stream[F,Row] =
for {
q <- Stream.eval(async.unboundedQueue[F,Either[Throwable,Row]])
_ <- Stream.suspend { h.withRows { e => async.unsafeRunAsync(q.enqueue1(e))(_ => IO.unit) }; Stream.emit(()) }
_ <- Stream.eval { F.delay(h.withRows(e => async.unsafeRunAsync(q.enqueue1(e))(_ => IO.unit))) }
row <- q.dequeue.rethrow
} yield row
```
Expand Down

0 comments on commit 52db296

Please sign in to comment.