pjfanning commented on code in PR #983:
URL: https://github.com/apache/incubator-pekko/pull/983#discussion_r1460339278


##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala:
##########
@@ -45,10 +45,11 @@ private[pekko] final class CollectWhile[In, Out](pf: 
PartialFunction[In, Out]) e
 
       override final def onPush(): Unit =
         try {
-          pf.applyOrElse(grab(in), NotApplied) match {
-            case NotApplied             => completeStage()
-            case result: Out @unchecked => push(out, result)
-            case _                      => throw new RuntimeException() // 
won't happen, compiler exhaustiveness check pleaser
+          val result = pf.applyOrElse(grab(in), NotApplied)

Review Comment:
   can we duplicate the code comment from Ops.scala below?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to