Make shortcuts inline

This commit is contained in:
Him188 2019-11-29 21:28:04 +08:00
parent 5342a349c1
commit 6817d8b94c

View File

@ -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()
@Suppress("NOTHING_TO_INLINE")
inline fun String.singleChain(): MessageChain = this.toMessage().chain()