Skip to content

Commit

Permalink
clenup
Browse files Browse the repository at this point in the history
  • Loading branch information
urmaul committed Oct 18, 2024
1 parent 4ee9a26 commit f45b156
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main/scala/io/moia/protos/teleproto/Writer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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] =
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit f45b156

Please sign in to comment.