From 41a94f9dd27a4afaf8e3949c72fe0a253fc44748 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 30 Jan 2020 02:27:07 +0800 Subject: [PATCH] Cleanup --- .../protocol/packet/login/LoginPacket.kt | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt index fc71737ce..22f33ee46 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt @@ -267,9 +267,7 @@ internal object LoginPacket : PacketFactory("wt sealed class LoginPacketResponse : Packet { object Success : LoginPacketResponse() { - override fun toString(): String { - return "LoginPacketResponse.Success" - } + override fun toString(): String = "LoginPacketResponse.Success" } data class Error( @@ -283,24 +281,24 @@ internal object LoginPacket : PacketFactory("wt class Slider( val url: String ) : Captcha() { - override fun toString(): String { - return "LoginPacketResponse.Captcha.Slider" - } + override fun toString(): String = "LoginPacketResponse.Captcha.Slider" } class Picture( val data: IoBuffer, val sign: ByteArray ) : Captcha() { - override fun toString(): String { - return "LoginPacketResponse.Captcha.Picture" - } + override fun toString(): String = "LoginPacketResponse.Captcha.Picture" } } - class UnsafeLogin(val url: String) : LoginPacketResponse() + data class UnsafeLogin(val url: String) : LoginPacketResponse() - class SMSVerifyCodeNeeded(val t402: ByteArray, val t403: ByteArray) : LoginPacketResponse() + class SMSVerifyCodeNeeded(val t402: ByteArray, val t403: ByteArray) : LoginPacketResponse(){ + override fun toString(): String { + return "LoginPacketResponse.SMSVerifyCodeNeeded" + } + } } @InternalAPI