Skip to content

Commit

Permalink
Apply scalafix
Browse files Browse the repository at this point in the history
  • Loading branch information
taig committed Sep 29, 2024
1 parent 28999a2 commit 0a40e7f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package io.taig.enumeration.ext
import cats.Order
import cats.Show
import cats.syntax.all.*
import io.circe.{Codec, Decoder, Encoder}
import io.circe.Codec
import io.circe.Decoder
import io.circe.Encoder

trait circe:
given decodeMapping[A, B](using mapping: Mapping[A, B], decoder: Decoder[B])(using Show[B]): Decoder[A] =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package io.taig.enumeration.ext

import io.taig.enumeration.ext.circe.given
import io.circe.Decoder
import io.circe.DecodingFailure
import io.circe.Encoder
import io.circe.Json
import io.taig.enumeration.ext.circe.*
import io.circe.{Decoder, DecodingFailure, Encoder, Json}
import io.taig.enumeration.ext.circe.given
import munit.FunSuite

final class CirceTest extends FunSuite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.taig.enumeration.ext

import cats.syntax.all.*
import cats.Show
import _root_.ciris.ConfigDecoder
import cats.Show
import cats.kernel.Order
import cats.syntax.all.*

trait ciris:
given conficDecoder[A, B, C: Show](using mapping: Mapping[B, C], decoder: ConfigDecoder[A, C]): ConfigDecoder[A, B] =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package io.taig.enumeration.ext

import scala.deriving.Mirror
import cats.data.NonEmptyList

import scala.deriving.Mirror

/** Derive all singelton values of a (nested) enumeration which may consist of Scala 3's `enum` or sealed traits and
* classes
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.taig.enumeration.ext

import cats.{Eq, Inject}
import cats.syntax.all.*
import cats.Eq
import cats.Inject
import cats.Order
import cats.data.NonEmptyList
import cats.data.NonEmptyMap
import cats.syntax.all.*

import scala.annotation.targetName
import cats.Order
import cats.data.NonEmptyList

sealed abstract class Mapping[A, B] extends Inject[A, B]:
def values: NonEmptyList[A]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.taig.enumeration.ext

import munit.FunSuite
import cats.data.NonEmptyList
import munit.FunSuite

final class EnumerationValuesTest extends FunSuite:
test("enum"):
Expand Down

0 comments on commit 0a40e7f

Please sign in to comment.