Skip to content

Commit

Permalink
Apply suggestion: remove implicit from 0-struct alt schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Oct 3, 2024
1 parent acef110 commit 04f9e83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
).lazily


implicit val schema: Schema[DeprecatedUnionProductCase] = constant(DeprecatedUnionProductCase()).withId(id).addHints(hints)
val schema: Schema[DeprecatedUnionProductCase] = constant(DeprecatedUnionProductCase()).withId(id).addHints(hints)

val alt = schema.oneOf[DeprecatedUnion]("p")
}
Expand All @@ -76,7 +76,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
).lazily


implicit val schema: Schema[UnionProductCaseDeprecatedAtCallSite] = constant(UnionProductCaseDeprecatedAtCallSite()).withId(id).addHints(hints)
val schema: Schema[UnionProductCaseDeprecatedAtCallSite] = constant(UnionProductCaseDeprecatedAtCallSite()).withId(id).addHints(hints)

val alt = schema.oneOf[DeprecatedUnion]("p2")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object Class extends ShapeTag.Companion[Class] {
val hints: Hints = Hints.empty


implicit val schema: Schema[AdtStruct] = constant(AdtStruct()).withId(id).addHints(hints)
val schema: Schema[AdtStruct] = constant(AdtStruct()).withId(id).addHints(hints)

val alt = schema.oneOf[Class]("package")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self =>
.appendToLast(if (recursive) ")" else "")
}
} else {
line"implicit val schema: $Schema_[${product.nameRef}] = $constant_(${product.nameRef}()).withId(id).addHints(hints)"
line"${schemaImplicit}val schema: $Schema_[${product.nameRef}] = $constant_(${product.nameRef}()).withId(id).addHints(hints)"
},
renderTypeclasses(product.hints, product.nameRef),
additionalLines
Expand Down

0 comments on commit 04f9e83

Please sign in to comment.