From 9767cb3a94a95a4ed0e21565593f6aac912762c3 Mon Sep 17 00:00:00 2001 From: Christopher Davenport Date: Tue, 4 Apr 2023 13:32:43 -0700 Subject: [PATCH] Use rest which was still in lexical scope --- .../io/chrisdavenport/rediculous/RedisConnection.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/shared/src/main/scala/io/chrisdavenport/rediculous/RedisConnection.scala b/core/shared/src/main/scala/io/chrisdavenport/rediculous/RedisConnection.scala index f56b431..0de57eb 100644 --- a/core/shared/src/main/scala/io/chrisdavenport/rediculous/RedisConnection.scala +++ b/core/shared/src/main/scala/io/chrisdavenport/rediculous/RedisConnection.scala @@ -589,14 +589,14 @@ object RedisConnection{ keypool.take(server).attempt.use{ case Right(m) => val out = Chunk.seq(rest.map(_._5)) - explicitPipelineRequest(m.value, out).map(c => (c, rest)).attempt.flatTap{// Currently Guarantee Chunk.size === returnSize + explicitPipelineRequest(m.value, out).attempt.flatTap{// Currently Guarantee Chunk.size === returnSize case Left(_) => m.canBeReused.set(Reusable.DontReuse) case _ => Applicative[F].unit } - case l@Left(_) => l.rightCast[(Chunk[Resp], List[((Either[Throwable, Resp]) => F[Unit], Option[ByteVector], Option[(Host,Port)], Int, Resp)])].pure[F] + case l@Left(_) => l.rightCast[Chunk[Resp]].pure[F] }.flatMap{ - case Right((n, thisChunk)) => - thisChunk.zipWithIndex.traverse_{ + case Right(n) => + rest.zipWithIndex.traverse_{ case ((toSet, key, _, retries, initialCommand), i) => val ref = Either.catchNonFatal(n(i)) ref match {