From 70f4d5988e42a2a27a73d3c84fda52f9947c095b Mon Sep 17 00:00:00 2001 From: viztea <44017640+viztea@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:28:33 -0800 Subject: [PATCH] fix(core/cache): swap Generator type parameters (#993) * Update KordCache.kt * chore: api dump --- core/api/core.klib.api | 32 +++++++++---------- core/src/commonMain/kotlin/cache/KordCache.kt | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 23bc8491c80..415e25074e9 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -5734,24 +5734,24 @@ final class dev.kord.core.cache/KordCacheBuilder { // dev.kord.core.cache/KordCa final fun (): kotlin/Function2, dev.kord.cache.api/DataEntryCache> // dev.kord.core.cache/KordCacheBuilder.defaultGenerator.|(){}[0] final fun (kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.defaultGenerator.|(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun <#A1: kotlin/Any, #B1: kotlin/Any> forDescription(dev.kord.cache.api.data/DataDescription<#A1, #B1>, kotlin/Function2, dev.kord.cache.api/DataEntryCache>?) // dev.kord.core.cache/KordCacheBuilder.forDescription|forDescription(dev.kord.cache.api.data.DataDescription<0:0,0:1>;kotlin.Function2,dev.kord.cache.api.DataEntryCache>?){0§;1§}[0] - final fun <#A1: kotlin/Any, #B1: kotlin/Any> none(): kotlin/Function2, dev.kord.cache.api/DataEntryCache> // dev.kord.core.cache/KordCacheBuilder.none|none(){0§;1§}[0] - final fun autoModerationRules(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.autoModerationRules|autoModerationRules(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun <#A1: kotlin/Any, #B1: kotlin/Any> forDescription(dev.kord.cache.api.data/DataDescription<#A1, #B1>, kotlin/Function2, dev.kord.cache.api/DataEntryCache>?) // dev.kord.core.cache/KordCacheBuilder.forDescription|forDescription(dev.kord.cache.api.data.DataDescription<0:0,0:1>;kotlin.Function2,dev.kord.cache.api.DataEntryCache>?){0§;1§}[0] + final fun <#A1: kotlin/Any, #B1: kotlin/Any> none(): kotlin/Function2, dev.kord.cache.api/DataEntryCache> // dev.kord.core.cache/KordCacheBuilder.none|none(){0§;1§}[0] + final fun autoModerationRules(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.autoModerationRules|autoModerationRules(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] final fun build(): dev.kord.cache.api/DataCache // dev.kord.core.cache/KordCacheBuilder.build|build(){}[0] - final fun channels(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.channels|channels(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun channels(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.channels|channels(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] final fun disableAll() // dev.kord.core.cache/KordCacheBuilder.disableAll|disableAll(){}[0] - final fun emojis(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.emojis|emojis(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun entitlements(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.entitlements|entitlements(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun guilds(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.guilds|guilds(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun members(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.members|members(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun messages(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.messages|messages(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun presences(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.presences|presences(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun roles(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.roles|roles(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun stickers(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.stickers|stickers(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun subscriptions(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.subscriptions|subscriptions(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun users(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.users|users(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun voiceState(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.voiceState|voiceState(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] - final fun webhooks(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.webhooks|webhooks(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun emojis(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.emojis|emojis(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun entitlements(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.entitlements|entitlements(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun guilds(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.guilds|guilds(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun members(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.members|members(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun messages(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.messages|messages(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun presences(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.presences|presences(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun roles(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.roles|roles(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun stickers(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.stickers|stickers(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun subscriptions(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.subscriptions|subscriptions(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun users(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.users|users(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun voiceState(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.voiceState|voiceState(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] + final fun webhooks(kotlin/Function2, dev.kord.cache.api/DataEntryCache>) // dev.kord.core.cache/KordCacheBuilder.webhooks|webhooks(kotlin.Function2,dev.kord.cache.api.DataEntryCache>){}[0] } final class dev.kord.core.cache/ViewKeys { // dev.kord.core.cache/ViewKeys|null[0] diff --git a/core/src/commonMain/kotlin/cache/KordCache.kt b/core/src/commonMain/kotlin/cache/KordCache.kt index b20740b0db9..bbbfb095973 100644 --- a/core/src/commonMain/kotlin/cache/KordCache.kt +++ b/core/src/commonMain/kotlin/cache/KordCache.kt @@ -11,7 +11,7 @@ import dev.kord.common.concurrentHashMap import dev.kord.common.entity.Snowflake import dev.kord.core.cache.data.* -public typealias Generator = (cache: DataCache, description: DataDescription) -> DataEntryCache +public typealias Generator = (cache: DataCache, description: DataDescription) -> DataEntryCache public class KordCacheBuilder {