Make Group not extends Iterable<Member>

This commit is contained in:
Him188 2019-12-07 00:51:22 +08:00
parent a2e7bba03b
commit fc5c73eafd
2 changed files with 3 additions and 3 deletions

View File

@ -5,6 +5,7 @@ package net.mamoe.mirai.contact
import kotlinx.coroutines.CoroutineScope
import net.mamoe.mirai.network.protocol.tim.packet.action.GroupInfo
import net.mamoe.mirai.network.protocol.tim.packet.action.QuitGroupResponse
import net.mamoe.mirai.utils.MiraiExperimentalAPI
import net.mamoe.mirai.utils.internal.PositiveNumbers
import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
@ -17,7 +18,7 @@ import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
* - Group ID([Group.internalId]) 是与调用 API 时使用的 id.( QQ 客户端中不可见)
* @author Him188moe
*/
interface Group : Contact, CoroutineScope, Iterable<Member>/*, Map<UInt, Member>*/ { // TODO: 2019/12/4 在 inline 稳定后实现 Map<UInt, Member>. 目前这样做会导致问题
interface Group : Contact, CoroutineScope/*, Map<UInt, Member>*/ { // TODO: 2019/12/4 在 inline 稳定后实现 Map<UInt, Member>. 目前这样做会导致问题
/**
* 内部 ID. 内部 ID [GroupId] 的映射
*/

View File

@ -15,6 +15,7 @@ import net.mamoe.mirai.network.qqAccount
import net.mamoe.mirai.network.sessionKey
import net.mamoe.mirai.qqAccount
import net.mamoe.mirai.sendPacket
import net.mamoe.mirai.utils.MiraiExperimentalAPI
import net.mamoe.mirai.utils.MiraiInternalAPI
import net.mamoe.mirai.utils.io.logStacktrace
import net.mamoe.mirai.withSession
@ -85,8 +86,6 @@ internal data class GroupImpl internal constructor(override val bot: Bot, val gr
}
override fun toString(): String = "Group(${this.id})"
override fun iterator(): Iterator<Member> = members.values.iterator()
}
@Suppress("FunctionName")