optimizations
Some checks failed
Build / build (push) Successful in 10m29s
Publish Image / publish (push) Failing after 31s
Test / build (push) Failing after 6m34s

This commit is contained in:
Chuck Smith
2024-04-02 14:08:08 -04:00
parent 4c9ec5aaaa
commit 07fd82b261
23 changed files with 296 additions and 265 deletions

View File

@@ -97,18 +97,14 @@ func (h *Hash) Compare(other Object) int {
return -1
}
for _, pair := range h.Pairs {
left := pair.Value
hashed := left.(Hasher)
hashed := pair.Value.(Hasher)
right, ok := obj.Pairs[hashed.Hash()]
if !ok {
return -1
}
cmp, ok := left.(Comparable)
if !ok {
return -1
}
if cmp.Compare(right.Value) != 0 {
return cmp.Compare(right.Value)
val := pair.Value.Compare(right.Value)
if val != 0 {
return val
}
}