From d5e6c2f890ef16622cc039fa956760ea75b1895b Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 27 Nov 2019 23:36:33 +0800 Subject: [PATCH] Simplify --- .../commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt index 1d2f59044..3c292b27c 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt @@ -106,9 +106,7 @@ internal suspend fun KClass.subscribeWhileNull(listener: s @ListenersBuilderDsl @PublishedApi internal suspend fun KClass.subscribeAll(listeners: suspend ListenerBuilder.() -> Unit) { - with(ListenerBuilder { this.subscribeInternal(it) }) { - listeners() - } + listeners(ListenerBuilder { this.subscribeInternal(it) }) } /**