From 6817d8b94c2d44733a878967a410d8d95ff79280 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 29 Nov 2019 21:28:04 +0800 Subject: [PATCH] Make shortcuts inline --- .../commonMain/kotlin/net.mamoe.mirai/message/PlainText.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/PlainText.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/PlainText.kt index 1736e1819..5e41b47d0 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/PlainText.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/PlainText.kt @@ -11,7 +11,8 @@ inline class PlainText(override val stringValue: String) : Message { /** * 构造 [PlainText] */ -fun String.toMessage(): PlainText = PlainText(this) +@Suppress("NOTHING_TO_INLINE") +inline fun String.toMessage(): PlainText = PlainText(this) /** * 得到包含作为 [PlainText] 的 [this] 的 [MessageChain]. @@ -21,4 +22,5 @@ fun String.toMessage(): PlainText = PlainText(this) * @see SingleMessageChain * @see SingleMessageChainImpl */ -fun String.singleChain(): MessageChain = this.toMessage().chain() \ No newline at end of file +@Suppress("NOTHING_TO_INLINE") +inline fun String.singleChain(): MessageChain = this.toMessage().chain() \ No newline at end of file