Skip to content

Commit 9d59905

Browse files
simpler
1 parent 232c061 commit 9d59905

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libp2p/src/main/kotlin/io/libp2p/etc/types/NettyExt.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ fun ChannelFuture.toCompletableFuture(): CompletableFuture<Channel> {
2323

2424
fun Future<*>.toVoidCompletableFuture(): CompletableFuture<Unit> {
2525
val ret = CompletableFuture<Unit>()
26-
this.addListener { f ->
27-
if (f.isSuccess) {
26+
this.addListener {
27+
if (it.isSuccess) {
2828
ret.complete(Unit)
2929
} else {
30-
ret.completeExceptionally(f.cause())
30+
ret.completeExceptionally(it.cause())
3131
}
3232
}
3333
return ret

0 commit comments

Comments
 (0)