diff --git a/common/src/commonMain/kotlin/entity/Snowflake.kt b/common/src/commonMain/kotlin/entity/Snowflake.kt index a7b38d4270f..205e98c820d 100644 --- a/common/src/commonMain/kotlin/entity/Snowflake.kt +++ b/common/src/commonMain/kotlin/entity/Snowflake.kt @@ -214,14 +214,10 @@ public value class Snowflake(public val value: ULong) : Comparable { } internal object Serializer : KSerializer { - override val descriptor: SerialDescriptor = ULong.serializer().descriptor - - override fun deserialize(decoder: Decoder): Snowflake = - Snowflake(decoder.decodeInline(descriptor).decodeLong().toULong()) - - override fun serialize(encoder: Encoder, value: Snowflake) { - encoder.encodeInline(descriptor).encodeLong(value.value.toLong()) - } + private val delegate = ULong.serializer() + override val descriptor: SerialDescriptor = delegate.descriptor + override fun deserialize(decoder: Decoder): Snowflake = Snowflake(delegate.deserialize(decoder)) + override fun serialize(encoder: Encoder, value: Snowflake) = delegate.serialize(encoder, value.value) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 17b77358e1c..890d3c1abd6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ kotlinpoet = "1.15.3" # https://github.com/square/kotlinpoet # tests junit5 = "5.10.1" # https://github.com/junit-team/junit5 -mockk = "1.13.8" # https://github.com/mockk/mockk +mockk = "1.13.10" # https://github.com/mockk/mockk slf4j = "2.0.9" # https://www.slf4j.org # plugins