Return Sequence instead of List #6

Merged
marvinelsen merged 8 commits from update-versions into main 2024-09-24 10:10:55 +00:00
Showing only changes of commit 7c16182d61 - Show all commits

View File

@ -20,11 +20,11 @@ internal class CedictParserImpl : CedictParser {
}
override fun parseCedict(inputStream: InputStream) =
inputStream.bufferedReader().useLines { lines ->
lines.filterNot(::isComment)
inputStream
.bufferedReader()
.readLines()
.filterNot(::isComment)
.map(::toCedictEntry)
.toList()
}
private fun isComment(line: String) = line[0] == COMMENT_MARKER