From 304d78cb70cbb1ef89179f35697c4ccb168a9b56 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Fri, 9 Sep 2022 09:13:01 +0200 Subject: [PATCH] remove unbound type parameter Unbound type parameters often cause performance issues and run time dispatch. Issue found using https://github.com/JuliaLang/julia/pull/46608 --- src/http.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http.jl b/src/http.jl index 3d87385..b48bb75 100644 --- a/src/http.jl +++ b/src/http.jl @@ -13,7 +13,7 @@ include("dasherize.jl") # https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#information_responses HTTP.statustext(::Val{T}) where T = HTTP.statustext(Int(T)) -HTTP.statustext(::Val{:default}) where T = HTTP.statustext(200) +HTTP.statustext(::Val{:default}) = HTTP.statustext(200) abstract type HttpParameter end @@ -140,4 +140,4 @@ struct Status{T} <: HttpParameter val::Union{Int, Symbol} end -Status(x) = Status{x}(x) \ No newline at end of file +Status(x) = Status{x}(x)