Skip to content

Commit

Permalink
fix compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
naoh87 committed Feb 1, 2022
1 parent cc5fb27 commit 4b8d307
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package fs2
package grpc
package server

import cats.syntax.all._
import cats.effect._
import cats.effect.std.Dispatcher
import io.grpc._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import io.grpc.ServerCallHandler
import io.grpc.Status
import io.grpc.StatusException
import io.grpc.StatusRuntimeException
import scala.concurrent.Future

object ImpureUnaryServerCall {
type Cancel = () => Any
Expand Down Expand Up @@ -131,7 +130,7 @@ final class ImpureResponder[F[_], Request, Response](
call.sendMessage(message)
}

private def handleOutcome[F[_]](completed: F[Unit])(implicit F: Sync[F]): F[Unit] = {
private def handleOutcome(completed: F[Unit])(implicit F: Sync[F]): F[Unit] = {
F.guaranteeCase(completed) {
case Outcome.Succeeded(_) => closeStream(Status.OK, new Metadata())
case Outcome.Errored(e) =>
Expand All @@ -147,7 +146,7 @@ final class ImpureResponder[F[_], Request, Response](
}
}

private def closeStream[F[_]](status: Status, metadata: Metadata)(implicit F: Sync[F]): F[Unit] =
private def closeStream(status: Status, metadata: Metadata)(implicit F: Sync[F]): F[Unit] =
F.delay(call.close(status, metadata))
}

Expand Down

0 comments on commit 4b8d307

Please sign in to comment.