mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 17:40:48 +00:00
Removes redundant check if key exists in BeeMap
This commit is contained in:
parent
75ec8d33a2
commit
fe21305bb3
@ -61,10 +61,8 @@ func (m *BeeMap) Set(k interface{}, v interface{}) bool {
|
||||
func (m *BeeMap) Check(k interface{}) bool {
|
||||
m.lock.RLock()
|
||||
defer m.lock.RUnlock()
|
||||
if _, ok := m.bm[k]; !ok {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
_, ok := m.bm[k]
|
||||
return ok
|
||||
}
|
||||
|
||||
// Delete the given key and value.
|
||||
|
Loading…
Reference in New Issue
Block a user