Skip to content

Commit

Permalink
Delete unused generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
squarejesse committed Aug 26, 2024
1 parent 104a3f9 commit 43e82ba
Showing 1 changed file with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal class ProtocolButton(
}
override fun text(text: String?) {
guestAdapter.appendPropertyChange(this.id, PropertyTag(1), guestAdapter.json.encodeToJsonElement(serializer_0, text))
this.guestAdapter.appendPropertyChange(this.id, PropertyTag(1), serializer_0, text)
}
override fun onClick(onClick: (() -> Unit)?) {
Expand Down Expand Up @@ -494,11 +494,6 @@ internal object GrowSerializer : KSerializer<Grow> {
override fun deserialize(decoder: Decoder): Grow {
throw AssertionError()
}
fun encode(json: Json, value: Grow): ModifierElement {
val element = json.encodeToJsonElement(this, value)
return ModifierElement(ModifierTag(3), element)
}
}
*/
internal fun generateProtocolModifierSerializers(
Expand Down Expand Up @@ -672,20 +667,6 @@ internal fun generateProtocolModifierSerializers(
.addStatement("throw %T()", Stdlib.AssertionError)
.build(),
)
.addFunction(
FunSpec.builder("encode")
.addParameter("json", KotlinxSerialization.Json)
.addParameter("value", modifierType)
.returns(Protocol.ModifierElement)
.addStatement("val element = json.encodeToJsonElement(this, value)")
.addStatement(
"return %T(%T(%L), element)",
Protocol.ModifierElement,
Protocol.ModifierTag,
modifier.tag,
)
.build(),
)
.build(),
)
}
Expand Down

0 comments on commit 43e82ba

Please sign in to comment.