Skip to content

Commit 88eca55

Browse files
committed
fix: Issues with new mongokt version
1 parent 200aa9f commit 88eca55

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

module-ped-bson/src/commonMain/kotlin/BsonCodecs.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,17 +300,17 @@ typealias BsonIdCodec = BsonIDCodec
300300
*
301301
* @since 2.0.0
302302
*/
303-
object BsonIDCodec : BsonCodec<ID<*>> {
303+
object BsonIDCodec : BsonCodec<ID<Any?>> {
304304
override fun encode(value: Any?) =
305-
tryInlineCodec(value) { it: ID<*> ->
305+
tryInlineCodec(value) { it: ID<Any?> ->
306306
success(it.bson)
307307
}
308308

309309
override fun decode(value: Any?) =
310310
tryInlineCodec(value) { it: BsonElement ->
311311
when (it) {
312-
is BsonObjectId -> success(ID<Any>(it.value))
313-
is BsonString -> success(ID(it.value))
312+
is BsonObjectId -> success(ID<Any?>(it.value))
313+
is BsonString -> success(ID<Any?>(it.value))
314314
else -> failure(
315315
CodecException(
316316
"Cannot decode ${it::class}; expected either " +

0 commit comments

Comments
 (0)