mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Don't infix for grantedWith
This commit is contained in:
parent
8661627607
commit
8d115cd954
@ -49,7 +49,7 @@ public abstract class AbstractConcurrentPermissionService<P : Permission> : Perm
|
||||
|
||||
val granted =
|
||||
if (permissibleIdentifiers.isEmpty()) false
|
||||
else permissibleIdentifiers.any { permissibleIdentifier grantedWith it }
|
||||
else permissibleIdentifiers.any { permissibleIdentifier.grantedWith(it) }
|
||||
|
||||
if (granted) get(permissionIdentifier)?.let { yield(it) }
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public interface PermissibleIdentifier {
|
||||
|
||||
public companion object {
|
||||
@ExperimentalPermission
|
||||
public infix fun PermissibleIdentifier.grantedWith(with: PermissibleIdentifier): Boolean {
|
||||
public fun PermissibleIdentifier.grantedWith(with: PermissibleIdentifier): Boolean {
|
||||
return allParentsWithSelf().any { it == with }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user