@@ -33,18 +33,18 @@ class DocumentationController @Inject() (
3333 documentationActor : ActorRef [Command ],
3434 releases : PlayReleases ,
3535 components : ControllerComponents ,
36- )(implicit actorSystem : org.apache.pekko.actor.ActorSystem , reverseRouter : ReverseRouter )
36+ )(using actorSystem : org.apache.pekko.actor.ActorSystem , reverseRouter : ReverseRouter )
3737 extends AbstractController (components) {
3838
39- private implicit val timeout : Timeout = Timeout (10 .seconds)
40- private implicit val typedSystem : ActorSystem [Nothing ] = actorSystem.toTyped
39+ private given timeout : Timeout = Timeout (10 .seconds)
40+ private given typedSystem : ActorSystem [Nothing ] = actorSystem.toTyped
4141 import typedSystem .executionContext
4242
4343 private val Rfc1123DateTimeFormat = DateTimeFormat .forPattern(" EEE, dd MMM yyyy HH:mm:ss 'GMT'" ).withZoneUTC()
4444
4545 private val EmptyContext = TranslationContext (Lang (" en" ), true , None , Nil , Nil )
4646
47- private def pageNotFound (context : TranslationContext , title : String , alternateVersions : Seq [Version ])(implicit
47+ private def pageNotFound (context : TranslationContext , title : String , alternateVersions : Seq [Version ])(using
4848 req : RequestHeader ,
4949 ) =
5050 NotFound (views.html.documentation.v2(messages, context, title, alternateVersions = alternateVersions))
@@ -81,7 +81,7 @@ class DocumentationController @Inject() (
8181 }
8282 }
8383
84- private def preferredLang (langs : Seq [Lang ])(implicit request : RequestHeader ) = {
84+ private def preferredLang (langs : Seq [Lang ])(using request : RequestHeader ) = {
8585 val maybeLangFromCookie = request.cookies.get(messages.langCookieName).flatMap(c => Lang .get(c.value))
8686 val candidateLangs = maybeLangFromCookie match {
8787 case Some (cookieLang) => cookieLang +: request.acceptLanguages
@@ -97,7 +97,7 @@ class DocumentationController @Inject() (
9797 actor : ActorRef [Command ],
9898 page : String ,
9999 msg : ActorRef [Response [T ]] => DocumentationActor .Request [T ],
100- )(block : T => Result )(implicit req : RequestHeader ): Future [Result ] = {
100+ )(block : T => Result )(using req : RequestHeader ): Future [Result ] = {
101101 actor.ask[Response [T ]](replyTo => msg(replyTo)).flatMap {
102102 case DocsNotFound (context) =>
103103 val future = Future .sequence(context.displayVersions.map(pageExists(_, page)))
@@ -371,7 +371,7 @@ class DocumentationController @Inject() (
371371 }
372372 }
373373
374- def withLangHeaders (result : Result , page : String , context : TranslationContext )(implicit
374+ def withLangHeaders (result : Result , page : String , context : TranslationContext )(using
375375 req : RequestHeader ,
376376 ) = {
377377 val linkHeader = context.alternatives
0 commit comments