Unverified Commit 1f2e8fb5 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

replace stream with iterator


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 062eb0d6
Pipeline #22351 passed with stages
in 5 minutes and 22 seconds
...@@ -35,8 +35,7 @@ object App ...@@ -35,8 +35,7 @@ object App
parse(args) match { parse(args) match {
case Some((sessionId, filters, dryRun)) => case Some((sessionId, filters, dryRun)) =>
try { try {
val matches = Stream.continually(poll) val matches = Iterator.continually(poll)
.takeWhile(_.nonEmpty)
.flatten .flatten
.flatMap(record => Report(record) match { .flatMap(record => Report(record) match {
case Success(rep) if filters.forall(f => f(rep)) => case Success(rep) if filters.forall(f => f(rep)) =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment