优化代码

This commit is contained in:
GoEdgeLab
2023-08-08 15:39:00 +08:00
parent 72c390fba5
commit 2a5aefe7f1
22 changed files with 27 additions and 53 deletions

View File

@@ -72,7 +72,7 @@ func (this *IntMap[K, V]) Has(k K) bool {
func (this *IntMap[K, V]) Get(k K) (value V) {
var index = this.index(k)
this.lockers[index].RLock()
value, _ = this.m[index][k]
value = this.m[index][k]
this.lockers[index].RUnlock()
return
}