Skip to content

Commit 950c0d8

Browse files
committed
Scala 2.12 compilation fix
1 parent e155a23 commit 950c0d8

File tree

1 file changed

+2
-2
lines changed
  • commons-redis/src/main/scala/com/avsystem/commons/redis

1 file changed

+2
-2
lines changed

commons-redis/src/main/scala/com/avsystem/commons/redis/Hash.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ object Hash {
4646
)
4747

4848
def slot(key: ByteString): Int = {
49-
val tagStart = key.indexOf[Byte]('{')
49+
val tagStart = key.indexOf('{'.toByte) // .toByte to make both Scala 2.12 and 2.13 compiler happy
5050
val bytes = if (tagStart >= 0) {
51-
val tagEnd = key.indexOf[Byte]('}', tagStart + 1)
51+
val tagEnd = key.indexOf('}'.toByte, tagStart + 1)
5252
if (tagEnd > tagStart + 1)
5353
key.iterator.slice(tagStart + 1, tagEnd)
5454
else key.iterator

0 commit comments

Comments
 (0)