Skip to content

Commit

Permalink
scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Jan 14, 2025
1 parent 1d50410 commit b57bd42
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class DataManagerConnectionManager[State: { JsonValueCodec, Lattice, Bottom, Has
}

override def connectToReplica(remoteReplicaId: String, uri: URI): Unit = {
dataManager.addLatentConnection(niotcp.connect(niotcp.defaultSocketChannel(new InetSocketAddress(uri.getHost, uri.getPort))))
dataManager.addLatentConnection(niotcp.connect(niotcp.defaultSocketChannel(new InetSocketAddress(
uri.getHost,
uri.getPort
))))
}

override def stop(): Unit = {
Expand Down
4 changes: 2 additions & 2 deletions Modules/RDTs/.jvm/src/test/scala/SimplePaxosSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class SimplePaxosSpec[A: Arbitrary](

class PWrite(id: LocalUid, value: A) extends Write(id, value) {
override def postCondition(
state: Map[LocalUid, Paxos[A]],
result: Try[Map[LocalUid, Paxos[A]]]
state: Map[LocalUid, Paxos[A]],
result: Try[Map[LocalUid, Paxos[A]]]
): Prop =
val res = result.get
val doubleProposal = res(id).accepts.groupBy(_.proposal).find(_._2.size > 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ class DotsOrderTest extends OrderTests[Dots](using Dots.partialOrder)(total = fa

// the specification of these tests is nice, but the generators are essentially useless, as it is extremely unlikely
// that they will produce any kind of comparable values
abstract class OrderTests[A: {Arbitrary, Lattice}](using pa: PartialOrdering[A])(total: Boolean, agreesWithEquals: Boolean)
extends munit.ScalaCheckSuite {
abstract class OrderTests[A: { Arbitrary, Lattice }](using pa: PartialOrdering[A])(
total: Boolean,
agreesWithEquals: Boolean
) extends munit.ScalaCheckSuite {

extension [A](using pa: PartialOrdering[A])(a: A)
def <(b: A) = pa.lt(a, b)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ConnectionManager[MSG](
connectionFuture.onComplete {
case Failure(exception) =>
running = false
if false then Console.err.println("Stopping listener")
if false then Console.err.println("Stopping listener")
case Success((socket, peerIdentity)) =>
if peerIdentity == localPublicId
then // We don't want to connect to ourselves.
Expand Down Expand Up @@ -136,7 +136,8 @@ class ConnectionManager[MSG](
if expectedUser == peerId
then connectionEstablished(socket, peerId, establishedByRemote = false)
else {
if false then Console.err.println(s"Expecting $expectedUser at $host:$port but connected to $peerId. Closing socket.")
if false then
Console.err.println(s"Expecting $expectedUser at $host:$port but connected to $peerId. Closing socket.")
try {
socket.close()
} catch
Expand Down

0 comments on commit b57bd42

Please sign in to comment.