From 5aa85d45bb27afa4fc96427c562fcbfd13a71c99 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 13 Dec 2019 12:14:34 +0800 Subject: [PATCH] #18, Make configuration inline --- mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt index acfc697fb..9cee23109 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt @@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(): Bot = apply { login().requireSuccess() } * 使用在默认配置基础上修改的配置进行登录, 返回 [this] */ @UseExperimental(ExperimentalContracts::class) -suspend inline fun Bot.alsoLogin(noinline configuration: BotConfiguration.() -> Unit): Bot { +suspend inline fun Bot.alsoLogin(configuration: BotConfiguration.() -> Unit): Bot { contract { callsInPlace(configuration, InvocationKind.EXACTLY_ONCE) }