Skip to content

Commit

Permalink
Improve method call to take a sublist of logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslabari committed Mar 11, 2024
1 parent 6be2a29 commit 9bd44a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class LogSinkImpl : LogSink {
val maxIndex = max?.let {
minOf(storedLogs.size, it)
} ?: storedLogs.size
val flushedLogs = storedLogs.toList().subList(0, maxIndex)
val flushedLogs = storedLogs.take(maxIndex)
storedLogs.removeAll(flushedLogs.toSet())
return flushedLogs
}
Expand Down

0 comments on commit 9bd44a7

Please sign in to comment.