From e913e99f66726fc3cd51730d1b58a895640bae8f Mon Sep 17 00:00:00 2001 From: Thijs Broersen Date: Wed, 8 Jan 2025 11:17:08 +0100 Subject: [PATCH] scalafmt --- examples/interop-http4s/build.sbt | 4 ++-- zio-json/shared/src/main/scala-2.x/zio/json/macros.scala | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/interop-http4s/build.sbt b/examples/interop-http4s/build.sbt index 3287077a..2cc15938 100644 --- a/examples/interop-http4s/build.sbt +++ b/examples/interop-http4s/build.sbt @@ -3,8 +3,8 @@ val ZioJsonVersion = "0.1.3+8-6eb41b5a-SNAPSHOT" lazy val zioJsonHttp4sExample = (project in file(".")) .settings( - name := "zio-json-http4s-example", - version := "1.0", + name := "zio-json-http4s-example", + version := "1.0", scalaVersion := "2.13.5", scalacOptions ++= Seq("-Xlint:_"), // Only required when using a zio-json snapshot diff --git a/zio-json/shared/src/main/scala-2.x/zio/json/macros.scala b/zio-json/shared/src/main/scala-2.x/zio/json/macros.scala index d10a521d..b1db7004 100644 --- a/zio-json/shared/src/main/scala-2.x/zio/json/macros.scala +++ b/zio-json/shared/src/main/scala-2.x/zio/json/macros.scala @@ -479,7 +479,7 @@ object DeriveJsonEncoder { def join[A](ctx: CaseClass[JsonEncoder, A])(implicit config: JsonCodecConfiguration): JsonEncoder[A] = if (ctx.parameters.isEmpty) new JsonEncoder[A] { - + override def isEmpty(a: A): Boolean = true def unsafeEncode(a: A, indent: Option[Int], out: Write): Unit = out.write("{}") @@ -573,7 +573,8 @@ object DeriveJsonEncoder { param.typeclass.toJsonAST(param.dereference(a)).map { value => if ( (!writeNulls && value == Json.Null) || - (!writeEmptyCollections && (value.asArray.exists(_.isEmpty) || (value.asObject.exists(_.fields.isEmpty)))) + (!writeEmptyCollections && (value.asArray + .exists(_.isEmpty) || (value.asObject.exists(_.fields.isEmpty)))) ) chunk else chunk :+ name -> value }