From 5e46fbec9fa6035c3250d7bff15372853eee8830 Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Tue, 29 Oct 2024 21:00:32 +0000 Subject: [PATCH] go --- .../main/scala-3/doobie/util/MkReadPlatform.scala | 12 ++++++------ .../main/scala-3/doobie/util/MkWritePlatform.scala | 12 ++++++------ .../src/test/scala/doobie/util/FragmentsSuite.scala | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/core/src/main/scala-3/doobie/util/MkReadPlatform.scala b/modules/core/src/main/scala-3/doobie/util/MkReadPlatform.scala index 5501d0086..6eced2967 100644 --- a/modules/core/src/main/scala-3/doobie/util/MkReadPlatform.scala +++ b/modules/core/src/main/scala-3/doobie/util/MkReadPlatform.scala @@ -10,8 +10,8 @@ import doobie.util.shapeless.OrElse trait MkReadPlatform: // Derivation for product types (i.e. case class) - given derived[P <: Product, A]( - using + implicit def derived[P <: Product, A]( + implicit m: Mirror.ProductOf[P], i: A =:= m.MirroredElemTypes, r: Read[A] `OrElse` Derived[MkRead[A]] @@ -21,8 +21,8 @@ trait MkReadPlatform: } // Derivation base case for tuple (1-element) - given productBase[H]( - using H: Read[H] `OrElse` Derived[MkRead[H]] + implicit def productBase[H]( + implicit H: Read[H] `OrElse` Derived[MkRead[H]] ): Derived[MkRead[H *: EmptyTuple]] = { val headInstance = H.fold(identity, _.instance) new Derived( @@ -35,8 +35,8 @@ trait MkReadPlatform: } // Derivation inductive case for tuples - given product[H, T <: Tuple]( - using + implicit def product[H, T <: Tuple]( + implicit H: Read[H] `OrElse` Derived[MkRead[H]], T: Read[T] `OrElse` Derived[MkRead[T]] ): Derived[MkRead[H *: T]] = { diff --git a/modules/core/src/main/scala-3/doobie/util/MkWritePlatform.scala b/modules/core/src/main/scala-3/doobie/util/MkWritePlatform.scala index 81658645b..2a789ece6 100644 --- a/modules/core/src/main/scala-3/doobie/util/MkWritePlatform.scala +++ b/modules/core/src/main/scala-3/doobie/util/MkWritePlatform.scala @@ -10,8 +10,8 @@ import doobie.util.shapeless.OrElse trait MkWritePlatform: // Derivation for product types (i.e. case class) - given derived[P <: Product, A]( - using + implicit def derived[P <: Product, A]( + implicit m: Mirror.ProductOf[P], i: m.MirroredElemTypes =:= A, w: Derived[MkWrite[A]] @@ -22,8 +22,8 @@ trait MkWritePlatform: ) // Derivation base case for tuple (1-element) - given productBase[H]( - using H: Write[H] `OrElse` Derived[MkWrite[H]] + implicit def productBase[H]( + implicit H: Write[H] `OrElse` Derived[MkWrite[H]] ): Derived[MkWrite[H *: EmptyTuple]] = { val headInstance = H.fold(identity, _.instance) new Derived( @@ -35,8 +35,8 @@ trait MkWritePlatform: } // Derivation inductive case for tuples - given product[H, T <: Tuple]( - using + implicit def product[H, T <: Tuple]( + implicit H: Write[H] `OrElse` Derived[MkWrite[H]], T: Write[H] `OrElse` Derived[MkWrite[H]] ): Derived[MkWrite[H *: T]] = { diff --git a/modules/core/src/test/scala/doobie/util/FragmentsSuite.scala b/modules/core/src/test/scala/doobie/util/FragmentsSuite.scala index da3c84c3f..d54d94fb9 100644 --- a/modules/core/src/test/scala/doobie/util/FragmentsSuite.scala +++ b/modules/core/src/test/scala/doobie/util/FragmentsSuite.scala @@ -5,7 +5,7 @@ package doobie.util import cats.data.NonEmptyList -import doobie.implicits.{*, given} +import doobie.implicits.* import cats.effect.IO import doobie.{Transactor, Fragment, Fragments}