From 8e6b3b726059f9c5190eafaf40bb676755398f7a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 22 Apr 2023 10:51:37 +0600 Subject: [PATCH] remove redundant class casts --- .../extensions/utils/ClassCastsNew.kt | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt index 1f91e33efc..0f55cd2733 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt @@ -16,8 +16,6 @@ import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink import dev.inmo.tgbotapi.requests.send.payments.SendInvoice import dev.inmo.tgbotapi.requests.stickers.InputSticker -import dev.inmo.tgbotapi.types.ChatFolderInviteLink -import dev.inmo.tgbotapi.types.ChatFolderInviteLinkUnlimited import dev.inmo.tgbotapi.types.ChatId import dev.inmo.tgbotapi.types.ChatIdWithThreadId import dev.inmo.tgbotapi.types.ChatIdentifier @@ -563,25 +561,6 @@ public inline fun WithUser.chatInviteLinkUnlimitedOrThrow(): ChatInviteLinkUnlim public inline fun WithUser.ifChatInviteLinkUnlimited(block: (ChatInviteLinkUnlimited) -> T): T? = chatInviteLinkUnlimitedOrNull() ?.let(block) -public inline fun WithUser.chatFolderInviteLinkOrNull(): ChatFolderInviteLink? = this as? - dev.inmo.tgbotapi.types.ChatFolderInviteLink - -public inline fun WithUser.chatFolderInviteLinkOrThrow(): ChatFolderInviteLink = this as - dev.inmo.tgbotapi.types.ChatFolderInviteLink - -public inline fun WithUser.ifChatFolderInviteLink(block: (ChatFolderInviteLink) -> T): T? = - chatFolderInviteLinkOrNull() ?.let(block) - -public inline fun WithUser.chatFolderInviteLinkUnlimitedOrNull(): ChatFolderInviteLinkUnlimited? = - this as? dev.inmo.tgbotapi.types.ChatFolderInviteLinkUnlimited - -public inline fun WithUser.chatFolderInviteLinkUnlimitedOrThrow(): ChatFolderInviteLinkUnlimited = - this as dev.inmo.tgbotapi.types.ChatFolderInviteLinkUnlimited - -public inline fun - WithUser.ifChatFolderInviteLinkUnlimited(block: (ChatFolderInviteLinkUnlimited) -> T): T? = - chatFolderInviteLinkUnlimitedOrNull() ?.let(block) - public inline fun WithUser.baseChosenInlineResultOrNull(): BaseChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult