Skip to content

Commit

Permalink
Merge pull request #128 from cmcaine/callable
Browse files Browse the repository at this point in the history
Use Base.Callable instead of Function in signatures
  • Loading branch information
cmcaine authored Dec 21, 2020
2 parents 368f421 + 50fde15 commit 83155af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ end
route(p::Vector, app...) = branch(req -> matchpath!(p, req), app...)
route(p::AbstractString, app...) = route(splitpath(p), app...)
route(app...) = route([], app...)
route(app::Function, p) = route(p, app)
route(app1::Function, app2::Function) = route([], app1, app2)
route(app::Base.Callable, p) = route(p, app)
route(app1::Base.Callable, app2::Base.Callable) = route([], app1, app2)

page(p::Vector, app...) = branch(req -> length(p) == length(req[:path]) && matchpath!(p, req), app...)
page(p::AbstractString, app...) = page(splitpath(p), app...)
page(app...) = page([], app...)
page(app::Function, p) = page(p, app)
page(app1::Function, app2::Function) = page([], app1, app2)
page(app::Base.Callable, p) = page(p, app)
page(app1::Base.Callable, app2::Base.Callable) = page([], app1, app2)

# Query routing

Expand Down

0 comments on commit 83155af

Please sign in to comment.