Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
benko-ct committed Nov 25, 2024
1 parent 52e5e05 commit 4eb3676
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ object MongoFormat {
case p: Mirror.ProductOf[A] => deriveCaseClass(p)
}

@annotation.nowarn("msg=New anonymous class definition will be duplicated at each inline site")
inline private def deriveTrait[A](mirrorOfSum: Mirror.SumOf[A]): MongoFormat[A] =
new MongoFormat[A] {
private val traitMetaData = AnnotationReader.readTraitMetaData[A]
Expand Down Expand Up @@ -87,6 +88,7 @@ object MongoFormat {
}
}

@annotation.nowarn("msg=New anonymous class definition will be duplicated at each inline site")
inline private def deriveCaseClass[A](mirrorOfProduct: Mirror.ProductOf[A]): MongoFormat[A] =
new MongoFormat[A] {
private val caseClassMetaData = AnnotationReader.readCaseClassMetaData[A]
Expand Down

0 comments on commit 4eb3676

Please sign in to comment.