Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Sep 27, 2024
1 parent b16af49 commit 188488a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zio-http/shared/src/main/scala/zio/http/Routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ object Routes extends RoutesCompanionVersionSpecific {
empty @@ Middleware.serveResources(path, resourcePrefix)

private[http] final case class Tree[-Env](tree: RoutePattern.Tree[RequestHandler[Env, Response]]) { self =>

def getAllMethods(path: Path): Set[Method] = tree.getAllMethods(path)

final def ++[Env1 <: Env](that: Tree[Env1]): Tree[Env1] =
Tree(self.tree ++ that.tree)

Expand All @@ -370,7 +373,7 @@ object Routes extends RoutesCompanionVersionSpecific {
final def get(method: Method, path: Path): Chunk[RequestHandler[Env, Response]] =
tree.get(method, path)
}
private[http] object Tree {
private[http] object Tree {
val empty: Tree[Any] = Tree(RoutePattern.Tree.empty)

def fromRoutes[Env](routes: Chunk[zio.http.Route[Env, Response]])(implicit trace: Trace): Tree[Env] =
Expand Down

0 comments on commit 188488a

Please sign in to comment.