From b9a7c07027159d2d058b529e37d488b1bdcc86cc Mon Sep 17 00:00:00 2001 From: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:01:09 +0530 Subject: [PATCH] Update HttpContentCodec.scala --- .../src/main/scala/zio/http/codec/HttpContentCodec.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zio-http/shared/src/main/scala/zio/http/codec/HttpContentCodec.scala b/zio-http/shared/src/main/scala/zio/http/codec/HttpContentCodec.scala index eac55e3f5d..6ae344c15b 100644 --- a/zio-http/shared/src/main/scala/zio/http/codec/HttpContentCodec.scala +++ b/zio-http/shared/src/main/scala/zio/http/codec/HttpContentCodec.scala @@ -25,7 +25,7 @@ sealed trait HttpContentCodec[A] { self => * A right biased merge of two HttpContentCodecs. */ def ++(that: HttpContentCodec[A]): HttpContentCodec[A] = - Default(choices ++ that.choices) + HttpContentCodec.Default(choices ++ that.choices) def decodeRequest(request: Request, config: CodecConfig): Task[A] = { val contentType = mediaTypeFromContentTypeHeader(request) @@ -77,7 +77,7 @@ sealed trait HttpContentCodec[A] { self => } def only(mediaType: MediaType): HttpContentCodec[A] = - Filtered(this, mediaType) + HttpContentCodec.Filtered(this, mediaType) def only(mediaType: Option[MediaType]): HttpContentCodec[A] = mediaType.map(only).getOrElse(self) @@ -163,7 +163,7 @@ object HttpContentCodec { implicit def fromSchema[A](implicit schema: Schema[A]): HttpContentCodec[A] = schemaCache - .getOrElseUpdate(schema, _ => json.only[A] ++ protobuf.only[A] ++ text.only[A]) + .getOrElseUpdate(schema, _: Schema[A] => json.only[A] ++ protobuf.only[A] ++ text.only[A]) .asInstanceOf[HttpContentCodec[A]] final private case class Default[A](