Skip to content

Commit

Permalink
Clean up: Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Feb 12, 2024
1 parent 72ece9d commit e217be1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 9 additions & 11 deletions core/src/main/scala/just/fp/syntax/EqualSyntax.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ package just.fp.syntax

import just.fp.Equal

/**
* @author Kevin Lee
/** @author Kevin Lee
* @since 2019-07-28
*/

trait EqualSyntax {
import EqualSyntax._

implicit def ToEqualOps[A](eqLeft: A): EqualOps[A] =
new EqualOps(eqLeft)
}
object EqualSyntax {
final class EqualOps[A] private[syntax] (val eqLeft: A) extends AnyVal {
final class EqualOps[A] private[syntax] (private val eqLeft: A) extends AnyVal {
def ===(eqRight: A)(implicit E: Equal[A]): Boolean =
E.equal(eqLeft, eqRight)
def !==(eqRight: A)(implicit E: Equal[A]): Boolean =
!E.equal(eqLeft, eqRight)
}
}

@SuppressWarnings(Array("org.wartremover.warts.ImplicitConversion"))
trait EqualSyntax {
import EqualSyntax._

implicit def ToEqualOps[A: Equal](eqLeft: A): EqualOps[A] =
new EqualOps(eqLeft)
}
4 changes: 2 additions & 2 deletions core/src/test/scala/just/fp/MonoidSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ object MonoidSpec extends Properties {
)
)

def testMonoidFunction[A : Monoid : Equal](name: String, monoid: A)(f: (Monoid[A], A) => Boolean): Result = {
def testMonoidFunction[A : Monoid](name: String, monoid: A)(f: (Monoid[A], A) => Boolean): Result = {
Result.diffNamed(s"=== $name Not true ===", Monoid[A], monoid)(f)
}

def propertyTestMonoidFunction[A : Monoid : Equal](name: String, genA: Gen[A])(f: (Monoid[A], A) => Boolean): Property = for {
def propertyTestMonoidFunction[A : Monoid](name: String, genA: Gen[A])(f: (Monoid[A], A) => Boolean): Property = for {
monoid <- genA.log("monoid")
} yield {
Result.diffNamed(s"=== $name Not false ===", Monoid[A], monoid)(f)
Expand Down

0 comments on commit e217be1

Please sign in to comment.