Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolysergeev committed Oct 30, 2022
1 parent fe08881 commit f2d39e7
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion redis/src/main/scala/zio/redis/api/Hashes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ trait Hashes {
Tuple4(ArbitraryInput[K](), LongInput, OptionalInput(PatternInput), OptionalInput(CountInput)),
Tuple2Output(ArbitraryOutput[Long](), ChunkTuple2Output(ArbitraryOutput[F](), ArbitraryOutput[V]()))
)
command.run((key, cursor, pattern.map(Pattern), count))
command.run((key, cursor, pattern.map(Pattern(_)), count))
}
}

Expand Down
2 changes: 1 addition & 1 deletion redis/src/main/scala/zio/redis/api/Keys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ trait Keys {
Tuple4(LongInput, OptionalInput(PatternInput), OptionalInput(CountInput), OptionalInput(RedisTypeInput)),
Tuple2Output(ArbitraryOutput[Long](), ChunkOutput(ArbitraryOutput[K]()))
)
command.run((cursor, pattern.map(Pattern), count, `type`))
command.run((cursor, pattern.map(Pattern(_)), count, `type`))
}
}

Expand Down
2 changes: 1 addition & 1 deletion redis/src/main/scala/zio/redis/api/Sets.scala
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ trait Sets {
Tuple4(ArbitraryInput[K](), LongInput, OptionalInput(PatternInput), OptionalInput(CountInput)),
Tuple2Output(MultiStringOutput.map(_.toLong), ChunkOutput(ArbitraryOutput[R]()))
)
command.run((key, cursor, pattern.map(Pattern), count))
command.run((key, cursor, pattern.map(Pattern(_)), count))
}
}

Expand Down
2 changes: 1 addition & 1 deletion redis/src/main/scala/zio/redis/api/SortedSets.scala
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ trait SortedSets {
Tuple4(ArbitraryInput[K](), LongInput, OptionalInput(PatternInput), OptionalInput(CountInput)),
Tuple2Output(MultiStringOutput.map(_.toLong), memberScoresOutput)
)
command.run((key, cursor, pattern.map(Pattern), count))
command.run((key, cursor, pattern.map(Pattern(_)), count))
}
}

Expand Down
4 changes: 2 additions & 2 deletions redis/src/main/scala/zio/redis/api/Streams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ trait Streams {
Tuple3(OptionalInput(CountInput), OptionalInput(BlockInput), StreamsInput[SK, I]()),
ChunkOutput(StreamOutput[SK, I, RK, RV]())
)
command.run((count.map(Count), block, (stream, Chunk.fromIterable(streams))))
command.run((count.map(Count(_)), block, (stream, Chunk.fromIterable(streams))))
}
}

Expand Down Expand Up @@ -674,7 +674,7 @@ trait Streams {
ChunkOutput(StreamOutput[SK, I, RK, RV]())
)
val noAckOpt = if (noAck) Some(NoAck) else None
command.run((group, consumer, count.map(Count), block, noAckOpt, (stream, Chunk.fromIterable(streams))))
command.run((group, consumer, count.map(Count(_)), block, noAckOpt, (stream, Chunk.fromIterable(streams))))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private[redis] object RedisConnectionLive {
writeBuffer <- makeBuffer
channel <- openChannel(address)
_ <- logScopeFinalizer("Redis connection is closed")
} yield new RedisConnectionLive(readBuffer, writeBuffer, channel)).mapError(RedisError.IOError)
} yield new RedisConnectionLive(readBuffer, writeBuffer, channel)).mapError(RedisError.IOError(_))

private final val ResponseBufferSize = 1024

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@

package zio.redis.executor.cluster

import java.io.IOException

import zio.{durationInt, Chunk, Exit, IO, Ref, Schedule, Scope, UIO, ZIO, ZLayer}
import zio.redis._
import zio.redis.api.Cluster.AskingCommand
import zio.redis.codec.StringUtf8Codec
import zio.redis.executor.{RedisConnectionLive, RedisExecutor}
import zio.redis.executor.cluster.RedisClusterExecutorLive._
import zio.redis.executor.node.RedisNodeExecutorLive
import zio.redis.executor.{RedisConnectionLive, RedisExecutor}
import zio.redis.options.Cluster._
import zio.schema.codec.Codec
import zio.{Chunk, Exit, IO, Ref, Schedule, Scope, UIO, ZIO, ZLayer, durationInt}

import java.io.IOException
import scala.util.Try

private[redis] final case class RedisClusterExecutorLive(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class RedisNodeExecutorLive(

connection
.write(bytes)
.mapError(RedisError.IOError)
.mapError(RedisError.IOError(_))
.tapBoth(
e => ZIO.foreachDiscard(reqs)(_.promise.fail(e)),
_ => ZIO.foreachDiscard(reqs)(req => resQueue.offer(req.promise))
Expand All @@ -69,7 +69,7 @@ final class RedisNodeExecutorLive(

private def receive: IO[RedisError, Unit] =
connection.read
.mapError(RedisError.IOError)
.mapError(RedisError.IOError(_))
.via(RespValue.decoder)
.collectSome
.foreach(response => resQueue.take.flatMap(_.succeed(response)))
Expand All @@ -86,7 +86,7 @@ object RedisNodeExecutorLive {
} yield executor
}

private final case class Request(command: Chunk[RespValue.BulkString], promise: Promise[RedisError, RespValue])
final case class Request(command: Chunk[RespValue.BulkString], promise: Promise[RedisError, RespValue])

private final val True: Any => Boolean = _ => true

Expand Down
4 changes: 2 additions & 2 deletions redis/src/test/scala/zio/redis/ApiSpec.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package zio.redis

import zio.{Chunk, ZLayer}
import zio.redis.executor.RedisExecutor
import zio.redis.executor.cluster.{RedisClusterConfig, RedisClusterExecutorLive}
import zio.test._
import zio.test.TestAspect._
import zio.test._
import zio.{Chunk, ZLayer}

object ApiSpec
extends ConnectionSpec
Expand Down

0 comments on commit f2d39e7

Please sign in to comment.