Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
benko-balog committed Oct 18, 2023
1 parent f1fccce commit b2d37af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package object generic extends Logging {
type MongoIgnore = io.sphere.mongo.generic.annotations.MongoIgnore @getter
type MongoTypeHint = io.sphere.mongo.generic.annotations.MongoTypeHint
type MongoTypeHintField = io.sphere.mongo.generic.annotations.MongoTypeHintField
type MongoProvidedFormatter = io.sphere.mongo.generic.annotations.MongoProvidedFormatter

def deriveMongoFormat[A]: MongoFormat[A] = macro MongoFormatMacros.deriveMongoFormat_impl[A]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ object SumTypesDerivingSpec {

sealed trait Color10
object Color10 {
@annotations.MongoProvidedFormatter
case object Red extends Color10
@MongoProvidedFormatter case object Red extends Color10
case class Custom(rgb: String) extends Color10

implicit val redFormatter: MongoFormat[Red.type] = new MongoFormat[Red.type] {
Expand All @@ -222,8 +221,7 @@ object SumTypesDerivingSpec {
sealed trait Color11
object Color11 {
case object Red extends Color11
@annotations.MongoProvidedFormatter
case class Custom(rgb: String) extends Color11
@MongoProvidedFormatter case class Custom(rgb: String) extends Color11

implicit val customFormatter: MongoFormat[Custom] = new MongoFormat[Custom] {
override def toMongoValue(a: Custom): Any =
Expand All @@ -242,8 +240,7 @@ object SumTypesDerivingSpec {
case class B2(int: Int) extends Bound

case object Red extends ColorUpperBound
@annotations.MongoProvidedFormatter
case class Custom[Type1 <: Bound](rgb: String) extends ColorUpperBound
@MongoProvidedFormatter case class Custom[Type1 <: Bound](rgb: String) extends ColorUpperBound

implicit def customFormatter[A <: Bound]: MongoFormat[Custom[A]] = new MongoFormat[Custom[A]] {
override def toMongoValue(a: Custom[A]): Any =
Expand All @@ -258,8 +255,7 @@ object SumTypesDerivingSpec {
sealed trait ColorUnbound
object ColorUnbound {
case object Red extends ColorUnbound
@annotations.MongoProvidedFormatter
case class Custom[A](rgb: String) extends ColorUnbound
@MongoProvidedFormatter case class Custom[A](rgb: String) extends ColorUnbound

implicit def customFormatter[A]: MongoFormat[Custom[A]] = new MongoFormat[Custom[A]] {
override def toMongoValue(a: Custom[A]): Any =
Expand Down

0 comments on commit b2d37af

Please sign in to comment.