Skip to content

Commit b7799a8

Browse files
committed
removed Date, DateTime, Bool and Number parseparam cases since they can all be handled by the fallback case.
1 parent 1614a4a commit b7799a8

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/utilities/misc.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,6 @@ function parseparam(::Type{String}, str::String; escape=true)
100100
return escape ? HTTP.unescapeuri(str) : str
101101
end
102102

103-
function parseparam(::Type{Date}, str::String; escape=true)
104-
return parse(Date, escape ? HTTP.unescapeuri(str) : str)
105-
end
106-
107-
function parseparam(::Type{DateTime}, str::String; escape=true)
108-
return parse(DateTime, escape ? HTTP.unescapeuri(str) : str)
109-
end
110103

111104
function parseparam(::Type{Char}, str::String; escape=true)
112105
value = escape ? HTTP.unescapeuri(str) : str
@@ -118,18 +111,12 @@ function parseparam(::Type{Regex}, str::String; escape=true)
118111
return Regex(value)
119112
end
120113

121-
function parseparam(::Type{Bool}, str::String; escape=true)
122-
return parse(Bool, escape ? HTTP.unescapeuri(str) : str)
123-
end
124114

125115
function parseparam(::Type{Symbol}, str::String; escape=true)
126116
value = escape ? HTTP.unescapeuri(str) : str
127117
return Symbol(value)
128118
end
129119

130-
function parseparam(::Type{T}, str::String; escape=true) where {T <: Number}
131-
return parse(T, escape ? HTTP.unescapeuri(str) : str)
132-
end
133120

134121
function parseparam(::Type{T}, str::String; escape=true) where {T <: Enum}
135122
return T(parse(Int, escape ? HTTP.unescapeuri(str) : str))

0 commit comments

Comments
 (0)