Skip to content

Commit

Permalink
Merge pull request #410 from typelevel/unused-constraints
Browse files Browse the repository at this point in the history
Remove unused WeakTypeTag constraint
  • Loading branch information
lorandszakacs authored Mar 26, 2021
2 parents 34f5c88 + 33aa6a1 commit 0579756
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

package org.typelevel.log4cats.slf4j.internal

import scala.annotation.{nowarn, tailrec}
import scala.annotation.tailrec
import scala.reflect.macros.blackbox

/**
Expand All @@ -45,13 +45,12 @@ import scala.reflect.macros.blackbox
*/
private[slf4j] class GetLoggerMacros(val c: blackbox.Context) {

final def safeCreateImpl[F: c.WeakTypeTag](f: c.Expr[F]) = getLoggerImpl[F](f, true)
final def safeCreateImpl[F](f: c.Expr[F]) = getLoggerImpl[F](f, true)

final def unsafeCreateImpl[F: c.WeakTypeTag](f: c.Expr[F]) = getLoggerImpl[F](f, false)
final def unsafeCreateImpl[F](f: c.Expr[F]) = getLoggerImpl[F](f, false)

/** Get a logger by reflecting the enclosing class name. */
@nowarn("cat=unused")
private def getLoggerImpl[F: c.WeakTypeTag](f: c.Expr[F], delayed: Boolean) = {
private def getLoggerImpl[F](f: c.Expr[F], delayed: Boolean) = {
import c.universe._

@tailrec def findEnclosingClass(sym: c.universe.Symbol): c.universe.Symbol = {
Expand Down

0 comments on commit 0579756

Please sign in to comment.