Исправлено ещё несколько deprecated предупреждений

This commit is contained in:
2026-05-17 19:39:21 +03:00
parent 2e23d0da0a
commit fe0c0e3f8f
2 changed files with 30 additions and 22 deletions

View File

@@ -190,10 +190,7 @@ class YandexDiskRepository(
when {
resp.isSuccessful -> {
val body = resp.body
val stream = body?.byteStream() ?: run {
resp.close()
throw IOException("Download failed: missing body")
}
val stream = body.byteStream()
return@withContext object : FilterInputStream(stream) {
override fun close() {
`in`.use {