mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
Fix linkedhashmap
This commit is contained in:
parent
18cd006d26
commit
4bbf5f2c30
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ func (m *Map[K, V]) ContainsKey(key K) bool {
|
|||
func (m *Map[K, V]) Get(key K) (V, bool) {
|
||||
m.init()
|
||||
value, loaded := m.rawMap[key]
|
||||
return value.Value.Value, loaded
|
||||
if loaded {
|
||||
return value.Value.Value, true
|
||||
} else {
|
||||
return common.DefaultValue[V](), false
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Map[K, V]) Put(key K, value V) V {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue