Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Feb 12, 2022
1 parent ce76479 commit b2bbec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions mirai-core-mock/src/contact/MockContact.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
Expand All @@ -13,6 +13,5 @@ import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import net.mamoe.mirai.contact.Contact

@JvmBlockingBridge
@Suppress("unused")
public interface MockContact : Contact, MockContactOrBot {
}
7 changes: 3 additions & 4 deletions mirai-core-mock/src/contact/MockGroup.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/dev/LICENSE
*/

@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")

package net.mamoe.mirai.mock.contact

Expand All @@ -27,7 +26,6 @@ import net.mamoe.mirai.utils.cast
import java.util.function.Consumer
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
import kotlin.internal.LowPriorityInOverloadResolution
import kotlin.random.Random

@JvmBlockingBridge
Expand Down Expand Up @@ -59,7 +57,8 @@ public interface MockGroup : Group, MockContact, MockMsgSyncSupport {
/** 添加一位成员, 该操作不会广播任何事件 */
@MockBotDSL
@JavaFriendlyAPI
@LowPriorityInOverloadResolution
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.LowPriorityInOverloadResolution
public fun addMember(id: Long, nick: String, action: Consumer<MockMemberInfoBuilder>): MockGroup {
return addMember(MockMemberInfoBuilder().uin(id).nick(nick).also { action.accept(it) }.build())
}
Expand Down

0 comments on commit b2bbec3

Please sign in to comment.