From f45b156287af7ab255ac2aa912eb7de8e9011b00 Mon Sep 17 00:00:00 2001 From: Bogdan Kolbik Date: Fri, 18 Oct 2024 16:10:11 +0200 Subject: [PATCH] clenup --- src/main/scala/io/moia/protos/teleproto/Writer.scala | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/scala/io/moia/protos/teleproto/Writer.scala b/src/main/scala/io/moia/protos/teleproto/Writer.scala index a6f445c..53fbdff 100644 --- a/src/main/scala/io/moia/protos/teleproto/Writer.scala +++ b/src/main/scala/io/moia/protos/teleproto/Writer.scala @@ -18,7 +18,6 @@ package io.moia.protos.teleproto import com.google.protobuf.duration.{Duration => PBDuration} import com.google.protobuf.timestamp.Timestamp -import io.scalaland.chimney.Transformer import java.time.{Instant, LocalTime} import java.util.UUID @@ -29,18 +28,15 @@ import scala.concurrent.duration.{Deadline, Duration} /** Provides writing Protocol Buffers model from a business model. */ -//@implicitNotFound( -// "No mapper from business model type ${M} to Protocol Buffers type ${P} was found. Try to implement an implicit Writer for this type." -//) -//trait Writer[M, P] extends Transformer[M, P] { +@implicitNotFound( + "No mapper from business model type ${M} to Protocol Buffers type ${P} was found. Try to implement an implicit Writer for this type." +) trait Writer[M, P] { /** Returns the written Protocol Buffer object. */ def write(model: M): P -// def transform(src: M): P = write(src) - /** Transforms each written result. */ def map[Q](f: P => Q): Writer[M, Q] = @@ -83,8 +79,6 @@ object Writer extends LowPriorityWrites { def instance[M, P](f: M => P): Writer[M, P] = f(_) -// def fromTransformer[M, P](transformer: Transformer[M, P]): Writer[M, P] = (model) => transformer.transform(model) - /* Combinators */ def transform[MV, PV](model: MV)(implicit valueWriter: Writer[MV, PV]): PV =