fix(import): use collector

This commit is contained in:
FineFindus 2023-08-14 14:32:59 +02:00
parent 0fcc1e6f79
commit 218f271ba6
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -23,6 +23,7 @@ import kotlin.streams.toList
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.decodeFromStream
import kotlinx.serialization.json.encodeToStream
import java.util.stream.Collectors
object ImportHelper {
/**
@ -79,7 +80,7 @@ object ImportHelper {
it.bufferedReader().use { reader ->
reader.lines().map { line -> line.substringBefore(",") }
.filter { channelId -> channelId.length == 24 }
.toList()
.collect(Collectors.toList())
}
}.orEmpty()
}