🔊 Add even more logging
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / utils / Buckets.kt
1 package net.pterodactylus.sone.utils
2
3 import freenet.support.api.Bucket
4
5 fun <R> Bucket.use(block: (Bucket) -> R): R = try {
6         block(this)
7 } finally {
8         free()
9 }