Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Jan 24, 2025
1 parent 0eb74d1 commit 14f165b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class HttpClientCatsBackend[F[_]: Async] private (

override protected def ensureOnAbnormal[T](effect: F[T])(finalizer: => F[Unit]): F[T] =
Async[F].guaranteeCase(effect) { outcome =>
if (outcome.isSuccess) Async[F].unit else Async[F].onError(finalizer)(t => Async[F].delay(t.printStackTrace()))
if (outcome.isSuccess) Async[F].unit
else Async[F].onError(finalizer) { case t => Async[F].delay(t.printStackTrace()) }
}

override protected def emptyBody(): InputStream = emptyInputStream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class HttpClientFs2Backend[F[_]: ConcurrentEffect: ContextShift] private (
override protected def ensureOnAbnormal[T](effect: F[T])(finalizer: => F[Unit]): F[T] =
ConcurrentEffect[F].guaranteeCase(effect) { exitCase =>
if (exitCase == ExitCase.Completed) ConcurrentEffect[F].unit
else ConcurrentEffect[F].onError(finalizer)(t => ConcurrentEffect[F].delay(t.printStackTrace()))
else ConcurrentEffect[F].onError(finalizer) { case t => ConcurrentEffect[F].delay(t.printStackTrace()) }
}

override protected def emptyBody(): Stream[F, Byte] = Stream.empty
Expand Down

0 comments on commit 14f165b

Please sign in to comment.