We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 232c061 commit 9d59905Copy full SHA for 9d59905
libp2p/src/main/kotlin/io/libp2p/etc/types/NettyExt.kt
@@ -23,11 +23,11 @@ fun ChannelFuture.toCompletableFuture(): CompletableFuture<Channel> {
23
24
fun Future<*>.toVoidCompletableFuture(): CompletableFuture<Unit> {
25
val ret = CompletableFuture<Unit>()
26
- this.addListener { f ->
27
- if (f.isSuccess) {
+ this.addListener {
+ if (it.isSuccess) {
28
ret.complete(Unit)
29
} else {
30
- ret.completeExceptionally(f.cause())
+ ret.completeExceptionally(it.cause())
31
}
32
33
return ret
0 commit comments