Apply some guy's law about logic operation reordering
This commit is contained in:
parent
695b48ae91
commit
99b00887a8
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ func CompareMap[K, V comparable](a, b map[K]V) bool {
|
|||
// Then compare key-value pairs
|
||||
for k, v := range a {
|
||||
val, ok := b[k]
|
||||
if !(ok && val == v) {
|
||||
if !ok || val != v {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue