Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Add mapK to Tracer, `SpanBuild…
Browse files Browse the repository at this point in the history
…er`, etc.

remove unnecessary Span.MappedK
  • Loading branch information
NthPortal committed Aug 1, 2023
1 parent e11e020 commit 04f7bce
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ trait Span[F[_]] extends SpanMacro[F] {
backend.end(timestamp)

/** Modify the context `F` using the transformation `f`. */
def mapK[G[_]](f: F ~> G): Span[G] = new Span.MappedK(this)(f)
def mapK[G[_]](f: F ~> G): Span[G] = Span.fromBackend(backend.mapK(f))

/** Modify the context `F` using an implicit [[KindTransformer]] from `F` to
* `G`.
Expand Down Expand Up @@ -206,9 +206,4 @@ object Span {
new Span[F] {
def backend: Backend[F] = back
}

/** Implementation for [[Span.mapK]]. */
private class MappedK[F[_], G[_]](span: Span[F])(f: F ~> G) extends Span[G] {
def backend: Backend[G] = span.backend.mapK(f)
}
}

0 comments on commit 04f7bce

Please sign in to comment.