Is there a variant of Closable.use { } that could...
# announcements
j
Is there a variant of Closable.use { } that could work on two Closables? I'm using OkIo and it often feels there is an indent too much
Copy code
fun base64(file: File) : String {
        check(file.canRead())
        Buffer().use { buffer ->
            Okio.source(file).use { source ->
                buffer.writeAll(source)
            }
            return buffer.readByteString().base64()
        }
    }