Skip to content

Commit

Permalink
Fix the comparison in deregister_auth_error_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jun 30, 2020
1 parent 951d83f commit 508247e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PlatformEngines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ is `true`.
`register_auth_error_handler` returns a zero-arg function that can be called to deregister the handler.
"""
function register_auth_error_handler(urlscheme::Union{AbstractString, Regex}, f)
function register_auth_error_handler(urlscheme::Union{AbstractString, Regex}, @nospecialize(f))
unique!(pushfirst!(AUTH_ERROR_HANDLERS, urlscheme => f))
return () -> deregister_auth_error_handler(urlscheme, f)
end
Expand All @@ -654,8 +654,8 @@ end
Removes `f` from the stack of authentication error handlers.
"""
function deregister_auth_error_handler(urlscheme::Union{AbstractString, Regex}, f)
filter!(handler -> handler !== (urlscheme => f), AUTH_ERROR_HANDLERS)
function deregister_auth_error_handler(urlscheme::Union{String, Regex}, @nospecialize(f))
filter!(handler -> !(handler.first == urlscheme && handler.second === f), AUTH_ERROR_HANDLERS)
return nothing
end

Expand Down

0 comments on commit 508247e

Please sign in to comment.