From ff854bbd4ee0712c10859c03e1c07a9b6319bcc4 Mon Sep 17 00:00:00 2001 From: Jules Ivanic Date: Mon, 19 Aug 2024 17:28:10 +1000 Subject: [PATCH] Add missing `case` on the `Method` implementation This prevents automatic derivation (the `zio-test` `DeriveGen.gen[Method]` one for example) to derive instance of `Method` --- .../src/main/scala/zio/http/Method.scala | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/zio-http/shared/src/main/scala/zio/http/Method.scala b/zio-http/shared/src/main/scala/zio/http/Method.scala index b38afb2514..e367719e89 100644 --- a/zio-http/shared/src/main/scala/zio/http/Method.scala +++ b/zio-http/shared/src/main/scala/zio/http/Method.scala @@ -66,15 +66,15 @@ object Method { final case class CUSTOM(name: String) extends Method - object OPTIONS extends Method { val name = "OPTIONS" } - object GET extends Method { val name = "GET" } - object HEAD extends Method { val name = "HEAD" } - object POST extends Method { val name = "POST" } - object PUT extends Method { val name = "PUT" } - object PATCH extends Method { val name = "PATCH" } - object DELETE extends Method { val name = "DELETE" } - object TRACE extends Method { val name = "TRACE" } - object CONNECT extends Method { val name = "CONNECT" } + case object OPTIONS extends Method { val name = "OPTIONS" } + case object GET extends Method { val name = "GET" } + case object HEAD extends Method { val name = "HEAD" } + case object POST extends Method { val name = "POST" } + case object PUT extends Method { val name = "PUT" } + case object PATCH extends Method { val name = "PATCH" } + case object DELETE extends Method { val name = "DELETE" } + case object TRACE extends Method { val name = "TRACE" } + case object CONNECT extends Method { val name = "CONNECT" } - object ANY extends Method { val name = "GET" } + case object ANY extends Method { val name = "GET" } }