This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 36ace8998c use LazyList (#2291)
36ace8998c is described below
commit 36ace8998ca8635f129c748efdef5faad702ca15
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Oct 2 02:14:22 2025 +0100
use LazyList (#2291)
---
.../src/test/scala/org/apache/pekko/cluster/ReachabilityPerfSpec.scala | 2 +-
.../scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala | 2 +-
.../test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git
a/cluster/src/test/scala/org/apache/pekko/cluster/ReachabilityPerfSpec.scala
b/cluster/src/test/scala/org/apache/pekko/cluster/ReachabilityPerfSpec.scala
index 0bd65653b2..85d6b1d37a 100644
--- a/cluster/src/test/scala/org/apache/pekko/cluster/ReachabilityPerfSpec.scala
+++ b/cluster/src/test/scala/org/apache/pekko/cluster/ReachabilityPerfSpec.scala
@@ -41,7 +41,7 @@ class ReachabilityPerfSpec extends AnyWordSpec with Matchers {
@nowarn
private def addUnreachable(base: Reachability, count: Int): Reachability = {
val observers = base.versions.keySet.take(count)
- val subjects = Stream.continually(base.versions.keySet).flatten.iterator
+ val subjects = LazyList.continually(base.versions.keySet).flatten.iterator
observers.foldLeft(base) {
case (r, o) =>
(1 to 5).foldLeft(r) { case (r, _) => r.unreachable(o,
subjects.next()) }
diff --git
a/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala
b/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala
index 3d6a07760f..7599596e76 100644
---
a/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala
+++
b/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala
@@ -52,7 +52,7 @@ final case class RemoteRouterConfig(local: Pool, nodes:
Iterable[Address]) exten
def this(local: Pool, nodes: Array[Address]) = this(local, nodes.toSeq)
// need this iterator as instance variable since Resizer may call
createRoutees several times
- @nowarn @transient private val nodeAddressIter: Iterator[Address] =
Stream.continually(nodes).flatten.iterator
+ @nowarn @transient private val nodeAddressIter: Iterator[Address] =
LazyList.continually(nodes).flatten.iterator
// need this counter as instance variable since Resizer may call
createRoutees several times
@transient private val childNameCounter = new AtomicInteger
diff --git
a/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala
b/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala
index 906eca8151..2e9c204b19 100644
---
a/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala
+++
b/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala
@@ -120,8 +120,7 @@ class MapAsyncPartitionedSpec
super.afterAll()
}
- @nowarn("msg=deprecated") // use Stream to support Scala 2.12
- private def infiniteStream(): Stream[Int] = Stream.from(1)
+ private def infiniteStream(): LazyList[Int] = LazyList.from(1)
@nowarn("msg=never used")
private def f(i: Int, p: Int): Future[Int] =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]