We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 05664ca + e907de8 commit 8aca8a8Copy full SHA for 8aca8a8
kernel/src/main/scala-2.13+/cats/kernel/compat/HashCompat.scala
@@ -89,7 +89,7 @@ private[kernel] class HashCompat {
89
rangeDiff = hash - prev
90
rangeState = 2
91
case 2 =>
92
- if (rangeDiff != hash - prev) rangeState = 3
+ if (rangeDiff != hash - prev || rangeDiff == 0) rangeState = 3
93
case _ =>
94
}
95
prev = hash
@@ -120,7 +120,7 @@ private[kernel] class HashCompat {
120
while (it.hasNext) {
121
h = mix(h, prev)
122
val hash = A.hash(it.next())
123
- if (rangeDiff != hash - prev) {
+ if (rangeDiff != hash - prev || rangeDiff == 0) {
124
h = mix(h, hash)
125
i += 1
126
0 commit comments