Skip to content

Commit c8a84e1

Browse files
committed
Update scalafmt to 3.10.4
1 parent 1e00959 commit c8a84e1

File tree

21 files changed

+189
-197
lines changed

21 files changed

+189
-197
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# - better interop with default IntelliJ IDEA setup (matching import and modifiers sorting logic)
44
# - better developer experience on laptop screens (like 16' MBPs) with IntelliJ IDEA (line wraps)
55

6-
version = 3.10.1
6+
version = 3.10.4
77

88
runner.dialect = scala213source3
99
fileOverride {

conhub/src/main/scala/com/evolution/pekko/conhub/ConHubSerializer.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ object ConHubSerializer {
6464

6565
private val codecRemoved = (codecs.utf8_32 :: codecVersion).as[RemoteEvent.Event.Removed]
6666

67-
private val codecDisconnected =
68-
(codecs.utf8_32 :: codecFiniteDuration :: codecVersion).as[RemoteEvent.Event.Disconnected]
67+
private val codecDisconnected = (codecs.utf8_32 :: codecFiniteDuration :: codecVersion).as[
68+
RemoteEvent.Event.Disconnected,
69+
]
6970

7071
private val codecSync = codecsNel(codecValue).as[RemoteEvent.Event.Sync]
7172

distributed-data/src/main/scala/com/evolution/pekko/cluster/ddata/SafeReplicator.scala

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,8 @@ import com.evolutiongaming.smetrics.MetricsHelper.*
1010
import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, ActorRefFactory, ActorSystem, Props}
1111
import org.apache.pekko.cluster.ddata.Replicator.{ReadConsistency, WriteConsistency}
1212
import org.apache.pekko.cluster.ddata.{
13-
DistributedData,
14-
Flag,
15-
GCounter,
16-
GSet,
17-
Key,
18-
LWWMap,
19-
ManyVersionVector,
20-
ORMap,
21-
ORMultiMap,
22-
ORSet,
23-
OneVersionVector,
24-
PNCounter,
25-
PNCounterMap,
26-
ReplicatedData,
27-
Replicator as R,
28-
VersionVector,
13+
DistributedData, Flag, GCounter, GSet, Key, LWWMap, ManyVersionVector, ORMap, ORMultiMap, ORSet, OneVersionVector,
14+
PNCounter, PNCounterMap, ReplicatedData, Replicator as R, VersionVector,
2915
}
3016
import org.apache.pekko.pattern.ask
3117
import org.apache.pekko.util.Timeout

effect-actor-tests/src/test/scala/com/evolution/pekko/effect/actor/tests/ActorOfTest.scala

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@ import cats.effect.unsafe.implicits.global
66
import cats.syntax.all.*
77
import com.evolution.pekko.effect.actor.IOSuite.*
88
import com.evolution.pekko.effect.actor.{
9-
Act,
10-
ActorCtx,
11-
ActorEffect,
12-
ActorOf,
13-
ActorRefOf,
14-
Ask,
15-
Call,
16-
Envelope,
17-
Receive,
18-
ReceiveOf,
19-
Tell,
9+
Act, ActorCtx, ActorEffect, ActorOf, ActorRefOf, Ask, Call, Envelope, Receive, ReceiveOf, Tell,
2010
}
2111
import com.evolution.pekko.effect.testkit.Probe
2212
import com.evolutiongaming.catshelper.CatsHelper.*

effect-actor-tests/src/test/scala/com/evolution/pekko/effect/actor/tests/CounterSpec.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ class CounterSpec extends AsyncFunSuite with ActorSuite with Matchers {
9696
val expect = (n: Int) =>
9797
for {
9898
a <- probe.expect[Int]
99-
} yield for {
100-
a <- a
101-
} yield a.msg shouldEqual n
99+
} yield
100+
for {
101+
a <- a
102+
} yield a.msg shouldEqual n
102103
for {
103104
a <- expect(1)
104105
_ <- inc

effect-actor/src/main/scala/com/evolution/pekko/effect/actor/Ask.scala

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ object Ask {
104104
for {
105105
a <- af(msg)
106106
b <- self(a, timeout, sender)
107-
} yield for {
108-
b <- b
109-
b <- bf(b)
110-
} yield b
107+
} yield
108+
for {
109+
b <- b
110+
b <- bf(b)
111+
} yield b
111112
}
112113

113114
def narrow[A1 <: A, B1](
@@ -117,10 +118,11 @@ object Ask {
117118
): Ask[F, A1, B1] = { (msg, timeout, sender) =>
118119
for {
119120
b <- self(msg, timeout, sender)
120-
} yield for {
121-
b <- b
122-
b <- f(b)
123-
} yield b
121+
} yield
122+
for {
123+
b <- b
124+
b <- f(b)
125+
} yield b
124126
}
125127
}
126128

effect-actor/src/test/scala/com/evolution/pekko/effect/actor/ActorVarTest.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ class ActorVarTest extends AsyncFunSuite with Matchers {
8080
actorVar.receive { state0 =>
8181
for {
8282
_ <- actions.add(Action.Updated(state0, state))
83-
} yield for {
84-
state <- state
85-
} yield {
86-
val release = actions.add(Action.Released(state))
87-
Releasable(state, release.some)
88-
}
83+
} yield
84+
for {
85+
state <- state
86+
} yield {
87+
val release = actions.add(Action.Released(state))
88+
Releasable(state, release.some)
89+
}
8990
}
9091
}
9192
_ <- GenSpawn[F].cede

effect-cluster-sharding/src/test/scala/com/evolution/pekko/effect/cluster/sharding/ClusterShardingLocalTest.scala

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,26 @@ class ClusterShardingLocalTest extends AsyncFunSuite with ActorSuite with Matche
8484
)
8585

8686
actorEffect = ActorEffect.fromActor[IO](actorRef)
87-
} yield for {
88-
a <- probe.expect[Int]
89-
b <- actorEffect.ask(ShardedMsg("id", 0), 1.second)
90-
a <- a
91-
_ <- IO(a.msg shouldEqual 0)
92-
_ <- IO(a.from.tell(a.msg.toString, ActorRef.noSender))
93-
b <- b
94-
_ <- IO(b shouldEqual "0")
95-
a <- probe.expect[HandOffStopMsg.type]
96-
_ <- clusterShardingLocal.rebalance
97-
a <- a
98-
_ <- IO(a.msg shouldEqual HandOffStopMsg)
99-
r <- clusterShardingLocal.clusterSharding.regions
100-
_ <- IO(r shouldEqual Set(typeName))
101-
s <- clusterShardingLocal.clusterSharding.shards(r.head)
102-
_ <- IO(s shouldEqual Set(ShardState("1", Set.empty)))
103-
r <- clusterShardingLocal.clusterSharding.shardRegion(typeName)
104-
_ <- IO(r shouldEqual actorRef)
105-
} yield {}
87+
} yield
88+
for {
89+
a <- probe.expect[Int]
90+
b <- actorEffect.ask(ShardedMsg("id", 0), 1.second)
91+
a <- a
92+
_ <- IO(a.msg shouldEqual 0)
93+
_ <- IO(a.from.tell(a.msg.toString, ActorRef.noSender))
94+
b <- b
95+
_ <- IO(b shouldEqual "0")
96+
a <- probe.expect[HandOffStopMsg.type]
97+
_ <- clusterShardingLocal.rebalance
98+
a <- a
99+
_ <- IO(a.msg shouldEqual HandOffStopMsg)
100+
r <- clusterShardingLocal.clusterSharding.regions
101+
_ <- IO(r shouldEqual Set(typeName))
102+
s <- clusterShardingLocal.clusterSharding.shards(r.head)
103+
_ <- IO(s shouldEqual Set(ShardState("1", Set.empty)))
104+
r <- clusterShardingLocal.clusterSharding.shardRegion(typeName)
105+
_ <- IO(r shouldEqual actorRef)
106+
} yield {}
106107

107108
result
108109
.use(identity)

effect-cluster-sharding/src/test/scala/com/evolution/pekko/effect/cluster/sharding/ClusterShardingTest.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ class ClusterShardingTest extends AsyncFunSuite with ActorSuite with Matchers {
5656
new LeastShardAllocationStrategy(1, 1),
5757
HandOffStopMessage,
5858
)
59-
} yield for {
60-
a <- probe.expect[Unit]
61-
_ <- IO(shardRegion.tell((), probe.actorEffect.toUnsafe))
62-
a <- a
63-
} yield a.msg
59+
} yield
60+
for {
61+
a <- probe.expect[Unit]
62+
_ <- IO(shardRegion.tell((), probe.actorEffect.toUnsafe))
63+
a <- a
64+
} yield a.msg
6465
result
6566
.use(identity)
6667
.run()

effect-eventsourcing/src/main/scala/com/evolution/pekko/effect/eventsourcing/Engine.scala

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ object Engine {
261261
d <- Deferred[F, Either[Throwable, A]]
262262
f <- loadOf(load, d).start
263263
_ <- offer(f)
264-
} yield for {
265-
a <- d.get
266-
a <- a.liftTo[F]
267-
} yield a
264+
} yield
265+
for {
266+
a <- d.get
267+
a <- a.liftTo[F]
268+
} yield a
268269
}
269270
}
270271
engine <- fenced(engine)
@@ -327,10 +328,11 @@ object Engine {
327328
fv <- load.start // fork `load` stage to allow multiple independent executions
328329
fu = execute(fv.joinWithNever, d)
329330
_ <- queue(Key.validate.some)(fu)
330-
} yield for {
331-
e <- d.get
332-
a <- e.liftTo[F]
333-
} yield a
331+
} yield
332+
for {
333+
e <- d.get
334+
a <- e.liftTo[F]
335+
} yield a
334336

335337
/**
336338
* Execute `load` with respect to:

0 commit comments

Comments
 (0)