Skip to content

Commit bc24f2b

Browse files
authored
chore: mention CollectWhile
1 parent be4b0a5 commit bc24f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private[pekko] final class CollectFirst[In, Out](pf: PartialFunction[In, Out]) e
4747
try {
4848
// 1. `applyOrElse` is faster than (`pf.isDefinedAt` and then `pf.apply`)
4949
// 2. using reference comparing here instead of pattern matching can generate less and quicker bytecode,
50-
// eg: just a simple `IF_ACMPNE`, and you can find the same trick in `Collect` operator.
50+
// eg: just a simple `IF_ACMPNE`, and you can find the same trick in `CollectWhile` operator.
5151
// If you interest, you can check the associated PR for this change and the
5252
// current implementation of `scala.collection.IterableOnceOps.collectFirst`.
5353
val result = pf.applyOrElse(grab(in), NotApplied)

0 commit comments

Comments
 (0)