mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
remove unless check
This commit is contained in:
parent
18e7d107ba
commit
6870ead73e
@ -156,11 +156,11 @@ func (v *TimedUserValidator) Remove(email string) bool {
|
||||
return false
|
||||
}
|
||||
ulen := len(v.users)
|
||||
if idx < ulen {
|
||||
v.users[idx] = v.users[ulen-1]
|
||||
v.users[ulen-1] = nil
|
||||
v.users = v.users[:ulen-1]
|
||||
}
|
||||
|
||||
v.users[idx] = v.users[ulen-1]
|
||||
v.users[ulen-1] = nil
|
||||
v.users = v.users[:ulen-1]
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user