Skip to content

Commit

Permalink
Update mockk to 1.13.10
Browse files Browse the repository at this point in the history
  • Loading branch information
zTrap committed Feb 28, 2024
1 parent e234eda commit eeac1bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions common/src/commonMain/kotlin/entity/Snowflake.kt
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,10 @@ public value class Snowflake(public val value: ULong) : Comparable<Snowflake> {
}

internal object Serializer : KSerializer<Snowflake> {
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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eeac1bd

Please sign in to comment.