mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 01:30:17 +08:00
Specify receiver to avoid being confusing
This commit is contained in:
parent
b17c30853c
commit
eaeb242800
@ -173,7 +173,7 @@ inline fun <reified E : Event> CoroutineScope.incoming(
|
||||
capacity: Int = Channel.UNLIMITED
|
||||
): ReceiveChannel<E> {
|
||||
return Channel<E>(capacity).apply {
|
||||
val listener = subscribeAlways<E>(coroutineContext) {
|
||||
val listener = this@incoming.subscribeAlways<E>(coroutineContext) {
|
||||
send(this)
|
||||
}
|
||||
this.invokeOnClose {
|
||||
|
Loading…
Reference in New Issue
Block a user