From 8411beeb954fa74dea560d78df8758893b9d744e Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 21 Oct 2024 19:49:09 +0100 Subject: [PATCH] use FastFuture.successful --- .../src/main/twirl/templates/ScalaServer/Handler.scala.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/main/twirl/templates/ScalaServer/Handler.scala.txt b/codegen/src/main/twirl/templates/ScalaServer/Handler.scala.txt index 42c46584..87419fb4 100644 --- a/codegen/src/main/twirl/templates/ScalaServer/Handler.scala.txt +++ b/codegen/src/main/twirl/templates/ScalaServer/Handler.scala.txt @@ -44,8 +44,8 @@ import pekko.grpc.PekkoGrpcGenerated @@ApiMayChange @@PekkoGrpcGenerated object @{serviceName}Handler { - private val notFound = scala.concurrent.Future.successful(model.HttpResponse(model.StatusCodes.NotFound)) - private val unsupportedMediaType = scala.concurrent.Future.successful(model.HttpResponse(model.StatusCodes.UnsupportedMediaType)) + private val notFound = org.apache.pekko.http.scaladsl.util.FastFuture.successful(model.HttpResponse(model.StatusCodes.NotFound)) + private val unsupportedMediaType = org.apache.pekko.http.scaladsl.util.FastFuture.successful(model.HttpResponse(model.StatusCodes.UnsupportedMediaType)) /** * Creates a `HttpRequest` to `HttpResponse` handler that can be used in for example `Http().bindAndHandleAsync`