From b8931607e26b9085df0fa7b94784a429a419aeb4 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 2 Sep 2022 23:56:00 +0200 Subject: [PATCH] Update scalafmt-core to 3.5.9 (#575) * Update scalafmt-core to 3.5.9 * Reformat with scalafmt 3.5.9 Executed command: scalafmt --non-interactive * Add 'Reformat with scalafmt 3.5.9' to .git-blame-ignore-revs * Delete unnecessary file .git-blame-ignore-revs Co-authored-by: Michael Nedokushev --- .scalafmt.conf | 2 +- .../opentracing/example/BackendServer.scala | 14 +++++++------- .../opentracing/example/ProxyServer.scala | 17 +++++++++-------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 0b098916..17aa5ab5 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.8" +version = "3.5.9" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 diff --git a/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/BackendServer.scala b/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/BackendServer.scala index bbd6c9e6..94f95ce0 100644 --- a/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/BackendServer.scala +++ b/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/BackendServer.scala @@ -1,7 +1,7 @@ package zio.telemetry.opentracing.example import zhttp.service.server.ServerChannelFactory -import zhttp.service.{EventLoopGroup, Server, ServerChannelFactory} +import zhttp.service.{ EventLoopGroup, Server, ServerChannelFactory } import zio.Console.printLine import zio.config.getConfig import zio.config.magnolia._ @@ -9,7 +9,7 @@ import zio.config.typesafe.TypesafeConfig import zio.telemetry.opentracing.example.JaegerTracer.makeService import zio.telemetry.opentracing.example.config.AppConfig import zio.telemetry.opentracing.example.http.BackendApp -import zio.{ZIO, ZIOAppDefault} +import zio.{ ZIO, ZIOAppDefault } object BackendServer extends ZIOAppDefault { @@ -18,16 +18,16 @@ object BackendServer extends ZIOAppDefault { val server: ZIO[AppEnv, Throwable, Unit] = ZIO.scoped[AppEnv] { for { - conf <- getConfig[AppConfig] + conf <- getConfig[AppConfig] tracingService = makeService(conf.tracer.host, "zio-backend") - server = Server.port(conf.backend.port) ++ Server.app(BackendApp.status(tracingService)) - _ <- server.make - _ <- printLine(s"BackendServer started at ${conf.backend.port}") *> ZIO.never + server = Server.port(conf.backend.port) ++ Server.app(BackendApp.status(tracingService)) + _ <- server.make + _ <- printLine(s"BackendServer started at ${conf.backend.port}") *> ZIO.never } yield () } val configLayer = TypesafeConfig.fromResourcePath(descriptor[AppConfig]) - val appLayer = ServerChannelFactory.auto ++ EventLoopGroup.auto(0) + val appLayer = ServerChannelFactory.auto ++ EventLoopGroup.auto(0) override def run = ZIO.provideLayer(configLayer >+> appLayer)(server.exitCode) diff --git a/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/ProxyServer.scala b/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/ProxyServer.scala index 3b2a17f7..25f7424d 100644 --- a/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/ProxyServer.scala +++ b/opentracing-example/src/main/scala/zio/telemetry/opentracing/example/ProxyServer.scala @@ -2,7 +2,7 @@ package zio.telemetry.opentracing.example import sttp.model.Uri import zhttp.service.server.ServerChannelFactory -import zhttp.service.{EventLoopGroup, Server, ServerChannelFactory} +import zhttp.service.{ EventLoopGroup, Server, ServerChannelFactory } import zio.Console.printLine import zio.config.getConfig import zio.config.magnolia._ @@ -10,7 +10,7 @@ import zio.config.typesafe.TypesafeConfig import zio.telemetry.opentracing.example.JaegerTracer.makeService import zio.telemetry.opentracing.example.config.AppConfig import zio.telemetry.opentracing.example.http.ProxyApp -import zio.{ZIO, ZIOAppDefault} +import zio.{ ZIO, ZIOAppDefault } object ProxyServer extends ZIOAppDefault { @@ -24,12 +24,13 @@ object ProxyServer extends ZIOAppDefault { val server: ZIO[AppEnv, Throwable, Unit] = ZIO.scoped[AppEnv] { for { - conf <- getConfig[AppConfig] - backendUrl <- ZIO.fromEither(Uri.safeApply(conf.backend.host, conf.backend.port)).mapError(new IllegalArgumentException(_)) - service = makeService(conf.tracer.host, "zio-proxy") - server = Server.port(conf.proxy.port) ++ Server.app(ProxyApp.statuses(backendUrl, service)) - _ <- server.make - _ <- printLine(s"ProxyServer started on ${conf.proxy.port}") *> ZIO.never + conf <- getConfig[AppConfig] + backendUrl <- + ZIO.fromEither(Uri.safeApply(conf.backend.host, conf.backend.port)).mapError(new IllegalArgumentException(_)) + service = makeService(conf.tracer.host, "zio-proxy") + server = Server.port(conf.proxy.port) ++ Server.app(ProxyApp.statuses(backendUrl, service)) + _ <- server.make + _ <- printLine(s"ProxyServer started on ${conf.proxy.port}") *> ZIO.never } yield () }