Skip to content

Commit

Permalink
Updated fs2 to 1.0.3 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
barambani committed Jan 27, 2019
1 parent 64c9fee commit 1754b82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Expand Up @@ -6,7 +6,7 @@ val `scala 212` = "2.12.8"

val V = new {
val circe = "0.11.1"
val fs2 = "1.0.2"
val fs2 = "1.0.3"
val `kind-projector` = "0.9.9"
val kittens = "1.2.0"
val refined = "0.9.4"
Expand Down
4 changes: 2 additions & 2 deletions cli/src/main/scala/laserdisc/cli/CLI.scala
Expand Up @@ -89,14 +89,14 @@ object CLI extends IOApp.WithContext { self =>
val promptStream: Stream[IO, String] = Stream.emit(s"$host:$port> ").repeat

val emptyPrompt: IO[Unit] =
promptStream.head.through(text.utf8Encode).to(io.stdout(blockingEC)).compile.drain
promptStream.head.through(text.utf8Encode).through(io.stdout(blockingEC)).compile.drain

def prompt(msg: String): IO[Unit] =
Stream
.emit(msg)
.append(promptStream.head)
.through(text.utf8Encode)
.to(io.stdout(blockingEC))
.through(io.stdout(blockingEC))
.compile
.drain

Expand Down
4 changes: 2 additions & 2 deletions fs2/src/main/scala/laserdisc/fs2/RedisConnection.scala
Expand Up @@ -38,11 +38,11 @@ object RedisConnection {

private[fs2] final object impl {

def send[F[_]: Monad](sink: Sink[F, Byte])(implicit log: LogWriter[F]): Sink[F, RESP] =
def send[F[_]: Monad](sink: Pipe[F, Byte, Unit])(implicit log: LogWriter[F]): Pipe[F, RESP, Unit] =
_.evalMap(resp => log.debug(s"sending $resp") >> resp.pure)
.through(streamEncoder.encode)
.flatMap(bits => Stream.chunk(Chunk.array(bits.toByteArray)))
.to(sink)
.through(sink)

def receive[F[_]: Effect](implicit log: LogWriter[F]): Pipe[F, Byte, RESP] = {

Expand Down

0 comments on commit 1754b82

Please sign in to comment.