Skip to content

Commit

Permalink
fix ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Oct 17, 2021
1 parent 756d712 commit 4302b95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions okio/src/jvmMain/kotlin/okio/Pipe.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions okio/src/jvmMain/kotlin/okio/Timeout.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 4302b95

Please sign in to comment.