mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +08:00
Fix size
This commit is contained in:
parent
ddae4c106a
commit
f3ec93071f
@ -81,7 +81,7 @@ fun UByteArray.toUHexString(separator: String = " ", offset: Int = 0, length: In
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun ByteArray.encodeToString(): String = String(this)
|
||||
|
||||
fun ByteArray.toReadPacket(offset: Int = 0, length: Int = this.size) = ByteReadPacket(this, offset = offset, length = length)
|
||||
fun ByteArray.toReadPacket(offset: Int = 0, length: Int = this.size - offset) = ByteReadPacket(this, offset = offset, length = length)
|
||||
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> ByteArray.read(t: ByteReadPacket.() -> R): R {
|
||||
|
Loading…
Reference in New Issue
Block a user