From bc4ac05979f18c8f2d18307cfc0f888d007c57b6 Mon Sep 17 00:00:00 2001 From: takapi327 Date: Thu, 19 Dec 2024 02:03:08 +0900 Subject: [PATCH] Fixed Encoder fold use summonAll --- .../src/main/scala/ldbc/dsl/codec/Encoder.scala | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/module/ldbc-dsl/src/main/scala/ldbc/dsl/codec/Encoder.scala b/module/ldbc-dsl/src/main/scala/ldbc/dsl/codec/Encoder.scala index 840244746..aa33dd3c7 100644 --- a/module/ldbc-dsl/src/main/scala/ldbc/dsl/codec/Encoder.scala +++ b/module/ldbc-dsl/src/main/scala/ldbc/dsl/codec/Encoder.scala @@ -93,14 +93,4 @@ object Encoder: case h *: EmptyTuple => Encoder[h] *: EmptyTuple case h *: t => Encoder[h] *: MapToTuple[t] - inline def infer[T]: Encoder[T] = - summonFrom[Encoder[T]] { - case parameter: Encoder[T] => parameter - case _ => error("Parameter cannot be inferred") - } - - inline def fold[T]: MapToTuple[T] = - inline erasedValue[T] match - case _: EmptyTuple => EmptyTuple - case _: (h *: EmptyTuple) => infer[h] *: EmptyTuple - case _: (h *: t) => infer[h] *: fold[t] + inline def fold[T]: MapToTuple[T] = summonAll[MapToTuple[T]]