From 4302b9554ea2005dad14ab793cf0a2662e58a0d9 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Mon, 9 Nov 2020 11:50:11 +0100 Subject: [PATCH] fix ktlint --- okio/src/jvmMain/kotlin/okio/Pipe.kt | 5 +---- okio/src/jvmMain/kotlin/okio/Timeout.kt | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/okio/src/jvmMain/kotlin/okio/Pipe.kt b/okio/src/jvmMain/kotlin/okio/Pipe.kt index 80d252ec33..fab20575d3 100644 --- a/okio/src/jvmMain/kotlin/okio/Pipe.kt +++ b/okio/src/jvmMain/kotlin/okio/Pipe.kt @@ -57,10 +57,7 @@ class Pipe(internal val maxBufferSize: Long) { while (byteCount > 0) { timeout.waitUntil(buffer) { - maxBufferSize - buffer.size > 0L // The source has drained the buffer - || canceled - || sourceClosed - || foldedSink != null // fold was called + maxBufferSize - buffer.size > 0L || canceled || sourceClosed || foldedSink != null } foldedSink?.let { diff --git a/okio/src/jvmMain/kotlin/okio/Timeout.kt b/okio/src/jvmMain/kotlin/okio/Timeout.kt index 4ebb09dd1c..380e945eda 100644 --- a/okio/src/jvmMain/kotlin/okio/Timeout.kt +++ b/okio/src/jvmMain/kotlin/okio/Timeout.kt @@ -215,7 +215,7 @@ actual open class Timeout { (monitor as Object).wait() } else { val waitNanos = waitUntilNanos - System.nanoTime() - if ( waitNanos < 0) { + if (waitNanos < 0) { throw InterruptedIOException("timeout") } val waitMillis = waitNanos / 1000000L @@ -227,7 +227,6 @@ actual open class Timeout { } } - /** * Applies the minimum intersection between this timeout and `other`, run `block`, then finally * rollback this timeout's values.