Commit 5aa85d45 authored by Him188's avatar Him188

#18, Make configuration inline

parent 6cc8a33c
...@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(): Bot = apply { login().requireSuccess() } ...@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(): Bot = apply { login().requireSuccess() }
* 使用在默认配置基础上修改的配置进行登录, 返回 [this] * 使用在默认配置基础上修改的配置进行登录, 返回 [this]
*/ */
@UseExperimental(ExperimentalContracts::class) @UseExperimental(ExperimentalContracts::class)
suspend inline fun Bot.alsoLogin(noinline configuration: BotConfiguration.() -> Unit): Bot { suspend inline fun Bot.alsoLogin(configuration: BotConfiguration.() -> Unit): Bot {
contract { contract {
callsInPlace(configuration, InvocationKind.EXACTLY_ONCE) callsInPlace(configuration, InvocationKind.EXACTLY_ONCE)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment