From 9a1493251175bc809fdd54c6838cc49530a7bc44 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 10 Aug 2021 11:32:22 +0600 Subject: [PATCH] small improvement of DownloadFileRequestCallFactory --- .../tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt index aec803e5f8..bf8e3687d9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt @@ -18,7 +18,7 @@ object DownloadFileRequestCallFactory : KtorCallFactory { ): T? = (request as? DownloadFile) ?.let { val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath) - return safely { + safely { @Suppress("UNCHECKED_CAST") client.get(fullUrl) as T // always ByteArray }