Reduce size of the use block in Crc32Command

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 5 years ago
parent 465078256f
commit 3ed591d89b
  1. 3
      crc32/src/main/java/dev/openrs2/crc32/Crc32Command.kt

@ -13,10 +13,9 @@ class Crc32Command : CliktCommand(name = "crc32") {
override fun run() { override fun run() {
val crc = CRC32() val crc = CRC32()
val bytes = ByteArray(4096)
input.use { input -> input.use { input ->
val bytes = ByteArray(4096)
while (true) { while (true) {
val len = input.read(bytes) val len = input.read(bytes)
if (len == -1) { if (len == -1) {

Loading…
Cancel
Save