Skip to content

Commit 8cba29c

Browse files
committed
Fix compilation under Scala 2.13.14
1 parent b1006c5 commit 8cba29c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

core/src/test/scala/com/avsystem/commons/serialization/GenRefTest.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ case class GenericCase[T](thing: T) extends GenericUnion[T]
3030
class GenRefTest extends AnyFunSuite {
3131
test("simple raw ref") {
3232
val path = RawRef.create[TransparentToplevel].ref(_.toplevel.middle.get.bottom.mapa("str")).normalize.toList
33-
assert(path == List("middle", "bot", "mapa", "str").map(RawRef.Field))
33+
assert(path == List("middle", "bot", "mapa", "str").map(RawRef.Field.apply))
3434
}
3535

3636
test("transparent wrapper field ref") {
3737
val path1 = RawRef.create[Toplevel].ref(_.middle.get.bottom.wrappy).normalize.toList
3838
val path2 = RawRef.create[Toplevel].ref(_.middle.get.bottom.wrappy.value).normalize.toList
39-
assert(path1 == List("middle", "bot", "wrappy").map(RawRef.Field))
39+
assert(path1 == List("middle", "bot", "wrappy").map(RawRef.Field.apply))
4040
assert(path2 == path1)
4141
}
4242

@@ -52,13 +52,13 @@ class GenRefTest extends AnyFunSuite {
5252
val ref2 = subRef andThen GenRef.create[Middle].ref(_.bottom.mapa("str"))
5353
val obj = TransparentToplevel(Toplevel(Middle(Bottom(Map("str" -> 42), Wrappy("oof"))).opt))
5454
assert(ref1(obj) == 42)
55-
assert(ref1.rawRef.normalize.toList == List("middle", "bot", "mapa", "str").map(RawRef.Field))
55+
assert(ref1.rawRef.normalize.toList == List("middle", "bot", "mapa", "str").map(RawRef.Field.apply))
5656
assert(ref2(obj) == 42)
57-
assert(ref2.rawRef.normalize.toList == List("middle", "bot", "mapa", "str").map(RawRef.Field))
57+
assert(ref2.rawRef.normalize.toList == List("middle", "bot", "mapa", "str").map(RawRef.Field.apply))
5858
}
5959

6060
test("gen ref implicits test") {
61-
import GenRef.Implicits._
61+
import GenRef.Implicits.*
6262

6363
val codecRef = CodecRef((_: TransparentToplevel).toplevel.middle.get.bottom.mapa("str"))
6464
val obj = TransparentToplevel(Toplevel(Middle(Bottom(Map("str" -> 42), Wrappy("oof"))).opt))
@@ -67,7 +67,7 @@ class GenRefTest extends AnyFunSuite {
6767

6868
test("sealed trait common field test") {
6969
val ref = GenRef.create[Toplevel].ref(_.seal.id)
70-
assert(ref.rawRef.normalize.toList == List("seal", "_id").map(RawRef.Field))
70+
assert(ref.rawRef.normalize.toList == List("seal", "_id").map(RawRef.Field.apply))
7171
}
7272

7373
test("generic sealed trait common field test") {

redis/src/main/scala/com/avsystem/commons/redis/RedisClusterClient.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ final class RedisClusterClient(
295295
val client = currentState.clientForSlot(slot)
296296
val result = client.executeRaw(pack).mapNow(_.apply(0))
297297
handleRedirection(pack, slot, result, config.redirectionStrategy, config.tryagainStrategy)
298-
.mapNow(PacksResult.Single)
298+
.mapNow(PacksResult.Single.apply)
299299
}
300300

301301
private def executeClusteredPacks[A](packs: RawCommandPacks, currentState: ClusterState)(implicit timeout: Timeout) = {

redis/src/main/scala/com/avsystem/commons/redis/actor/RedisConnectionActor.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ object RedisConnectionActor {
623623
val packsResultOpt = preprocessors match {
624624
case null => Opt(PacksResult.Empty)
625625
case prep: ReplyPreprocessor =>
626-
prep.preprocess(message, state).map(PacksResult.Single)
626+
prep.preprocess(message, state).map(PacksResult.Single.apply)
627627
case queue: mutable.Queue[ReplyPreprocessor@unchecked] =>
628628
queue.front.preprocess(message, state).flatMap { preprocessedMsg =>
629629
if (replies == null) {

redis/src/main/scala/com/avsystem/commons/redis/commands/ReplyDecoders.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ object ReplyDecoders {
303303
}
304304

305305
val multiBulkAsXConsumerInfo: ReplyDecoder[XConsumerInfo] =
306-
flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XConsumerInfo)
306+
flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XConsumerInfo.apply)
307307

308308
val multiBulkAsXGroupInfo: ReplyDecoder[XGroupInfo] =
309-
flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XGroupInfo)
309+
flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XGroupInfo.apply)
310310

311311
def multiBulkAsXStreamInfoOf[Rec: RedisRecordCodec]: ReplyDecoder[XStreamInfo[Rec]] =
312312
flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XStreamInfo[Rec](_))

0 commit comments

Comments
 (0)