Commit 6817d8b9 authored by Him188's avatar Him188

Make shortcuts inline

parent 5342a349
......@@ -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
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