Skip to content

Commit c01b4d6

Browse files
committed
Fixes to laws.
1 parent 1ec03ec commit c01b4d6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

js/src/test/scala/cats/tests/FutureTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class FutureTests extends CatsSuite {
3838
}
3939

4040
implicit val throwableEq: Eq[Throwable] =
41-
Eq[String].on(_.toString)
41+
Eq.by[Throwable, String](_.toString)
4242

4343
implicit val comonad: Comonad[Future] = futureComonad(timeout)
4444

kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Tests extends FunSuite with Discipline {
9494

9595
{
9696
// needed for Cogen[Map[...]]
97-
implicit val ohe: Ordering[HasEq[Int]] = Ordering[Int].on(_.a)
97+
implicit val ohe: Ordering[HasEq[Int]] = Ordering.by[HasEq[Int], Int](_.a)
9898
checkAll("Eq[Map[String, HasEq[Int]]]", EqTests[Map[String, HasEq[Int]]].eqv)
9999
}
100100

@@ -365,7 +365,7 @@ class Tests extends FunSuite with Discipline {
365365

366366
object HasHash {
367367
implicit def hasHash[A: Hash]: Hash[HasHash[A]] =
368-
Hash.by(_.a) // not Hash[A].on(_.a) because of diamond inheritance problems with Eq
368+
Hash.by(_.a)
369369
implicit def hasHashArbitrary[A: Arbitrary]: Arbitrary[HasHash[A]] =
370370
Arbitrary(arbitrary[A].map(HasHash(_)))
371371
implicit def hasCogen[A: Cogen]: Cogen[HasHash[A]] =

0 commit comments

Comments
 (0)