Skip to content

Commit

Permalink
run Scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hamnis committed Jun 24, 2024
1 parent 6240227 commit 93a6f90
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.circe.jackson.benchmark

import cats.instances.AllInstances
import io.circe.testing.{ ArbitraryInstances, EqInstances }
import cats.syntax.{ AllSyntax }
import cats.syntax.AllSyntax

class ParsingBenchmarkSpec
extends munit.FunSuite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.circe.jackson.benchmark

import cats.instances.AllInstances
import io.circe.testing.{ ArbitraryInstances, EqInstances }
import cats.syntax.{ AllSyntax }
import cats.syntax.AllSyntax
import io.circe.parser.decode
import java.nio.ByteBuffer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private[jackson] final class CirceJsonDeserializer(factory: TypeFactory, klass:
case JsonTokenId.ID_FIELD_NAME =>
parserContext match {
case (c: ReadingMap) :: stack => (None, c.setField(jp.getCurrentName) +: stack)
case _ => throw new RuntimeException("We weren't reading an object, something went wrong")
case _ => throw new RuntimeException("We weren't reading an object, something went wrong")
}

case JsonTokenId.ID_END_OBJECT =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private[jackson] final object CirceJsonSerializer extends JsonSerializer[Json] {
// configuration is ignored when called from ObjectMapper.valueToTree
val raw = x.stripTrailingZeros.toPlainString

if (raw contains ".") json.writeTree(new DecimalNode(new JBigDecimal(raw)))
if (raw.contains(".")) json.writeTree(new DecimalNode(new JBigDecimal(raw)))
else json.writeTree(new BigIntegerNode(new BigInteger(raw)))
}
case Json.JString(v) => json.writeString(v)
Expand Down

0 comments on commit 93a6f90

Please sign in to comment.