Skip to content

Commit

Permalink
Merge pull request #271 from kubukoz/fs2-observe
Browse files Browse the repository at this point in the history
Replace redundant `observe` with `through`
  • Loading branch information
vigoo authored Jun 7, 2021
2 parents 70340bc + 529b0cf commit f1fe040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ trait ProxFS2[F[_]] extends Prox {

protected override final def drainToJavaOutputStream(stream: ProxStream[Byte], output: io.OutputStream, flushChunks: Boolean): ProxIO[Unit] =
stream
.observe(
.through(
if (flushChunks) writeAndFlushOutputStream(output)(_).drain
else fs2.io.writeOutputStream(
effect(output, UnknownProxError.apply),
Expand Down
2 changes: 1 addition & 1 deletion prox-fs2/src/main/scala/io/github/vigoo/prox/ProxFS2.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ trait ProxFS2[F[_]] extends Prox {

protected override final def drainToJavaOutputStream(stream: ProxStream[Byte], output: io.OutputStream, flushChunks: Boolean): ProxIO[Unit] =
stream
.observe(
.through(
if (flushChunks) writeAndFlushOutputStream(output)
else fs2.io.writeOutputStream(
effect(output, UnknownProxError.apply),
Expand Down

0 comments on commit f1fe040

Please sign in to comment.