Skip to content

Commit

Permalink
Delete unused
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Dec 31, 2024
1 parent 68d356a commit 0b30bb3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
47 changes: 33 additions & 14 deletions benchmark/src/main/scala/benchmark/Model.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ case class Model1(
) derives Table

object Model1:
given Codec[Model1] = (Codec[Int]).to[Model1]
given Codec[Model1] = Codec[Int].to[Model1]

case class Model5(
c1: Int,
Expand Down Expand Up @@ -64,12 +64,9 @@ case class Model20(
) derives Table

object Model20:
given Codec[Model20] = (
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int]
).to[Model20]
given Codec[Model20] =
Codec[(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int)]
.to[Model20]

case class Model25(
c1: Int,
Expand Down Expand Up @@ -100,13 +97,35 @@ case class Model25(
) derives Table

object Model25:
given Codec[Model25] = (
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *:
Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int] *: Codec[Int]
).to[Model25]
given Codec[Model25] = Codec[
(
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int
)
].to[Model25]

case class City(
id: Int,
Expand Down
3 changes: 0 additions & 3 deletions module/ldbc-dsl/src/main/scala/ldbc/dsl/codec/Codec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,3 @@ object Codec extends TwiddleSyntax[Codec]:

given [P <: Product](using mirror: Mirror.ProductOf[P], codec: Codec[mirror.MirroredElemTypes]): Codec[P] =
codec.to[P]

given [A]: Conversion[Codec[A], Encoder[A]] = _.asEncoder
given [A]: Conversion[Codec[A], Decoder[A]] = _.asDecoder

0 comments on commit 0b30bb3

Please sign in to comment.