Skip to content

Commit 93fef9b

Browse files
committed
Bump Scalafmt to 2.4.2
- Bump sbt-scalafmt to 2.3.4
1 parent aa2f710 commit 93fef9b

File tree

6 files changed

+19
-24
lines changed

6 files changed

+19
-24
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "2.0.1"
1+
version = "2.4.2"
22
style = defaultWithAlign
33
docstrings = JavaDoc
44
assumeStandardLibraryStripMargin = true

build.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ licenses := Seq(
44
)
55
publishMavenStyle := true
66
Test / publishArtifact := false
7-
pomIncludeRepository := { _ =>
8-
false
9-
}
7+
pomIncludeRepository := { _ => false }
108
ThisBuild / publishTo := {
119
val nexus = "https://oss.sonatype.org/"
1210
if (isSnapshot.value)

core/loop.scala

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ object EventLoop {
99
// Schedule loop execution after main ends
1010
scalanative.runtime.ExecutionContext.global.execute(
1111
new Runnable {
12+
1213
/**
13-
* This is the implementation of the event loop
14-
* that integrates with libuv. The logic is the
15-
* following:
16-
* - First we run all Scala futures in the default
17-
* execution context
18-
* - Then in loop:
19-
* - we check if they generated IO calls on
20-
* the event loop
21-
* - If it's the case we run libuv's event loop
22-
* using UV_RUN_ONCE that blocks only once
23-
* - We run the default execution context again
24-
* in case the callbacks generated new Futures
25-
*/
14+
* This is the implementation of the event loop
15+
* that integrates with libuv. The logic is the
16+
* following:
17+
* - First we run all Scala futures in the default
18+
* execution context
19+
* - Then in loop:
20+
* - we check if they generated IO calls on
21+
* the event loop
22+
* - If it's the case we run libuv's event loop
23+
* using UV_RUN_ONCE that blocks only once
24+
* - We run the default execution context again
25+
* in case the callbacks generated new Futures
26+
*/
2627
def run(): Unit = {
2728
scala.scalanative.runtime.loop()
2829
while (uv_loop_alive(loop) != 0) {

examples/timer/main.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ object Main {
1414
println("boop")
1515
Timer.delay(1.second)
1616
}
17-
.onComplete { _ =>
18-
println("done")
19-
}
17+
.onComplete { _ => println("done") }
2018
}
2119
}

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")
22
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
33
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")
4-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0")
4+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")

server/server.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ object Server {
8989

9090
state._1 = id
9191
state._2 = client
92-
state._3 = Parser.initConnection(id) { r =>
93-
handler(r, client)
94-
}
92+
state._3 = Parser.initConnection(id) { r => handler(r, client) }
9593
!(client.asInstanceOf[Ptr[Ptr[Byte]]]) = state.asInstanceOf[Ptr[Byte]]
9694

9795
uv_tcp_init(EventLoop.loop, client)

0 commit comments

Comments
 (0)