LessThan returns true if this state entry is less than the other state entry. The ordering is arbitrary and is used to implement binary search and to efficiently deduplicate entries.
(b StateEntry)
| 147 | // LessThan returns true if this state entry is less than the other state entry. |
| 148 | // The ordering is arbitrary and is used to implement binary search and to efficiently deduplicate entries. |
| 149 | func (a StateEntry) LessThan(b StateEntry) bool { |
| 150 | if a.StateKeyTuple != b.StateKeyTuple { |
| 151 | return a.StateKeyTuple.LessThan(b.StateKeyTuple) |
| 152 | } |
| 153 | return a.EventNID < b.EventNID |
| 154 | } |
| 155 | |
| 156 | // Deduplicate takes a set of state entries and ensures that there are no |
| 157 | // duplicate (event type, state key) tuples. If there are then we dedupe |
no outgoing calls
no test coverage detected