Skip to content

Commit

Permalink
Implicit nil return
Browse files Browse the repository at this point in the history
There is no need to return `nil` as this is the default so let's avoid adding it.
  • Loading branch information
boekkooi-lengoo committed Jan 12, 2024
1 parent dd7af11 commit c32baae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/resty/radixtree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -687,22 +687,22 @@ end

local function match_route_params(req_path, route, opts)
if not opts.matched and not route.param then
return true, nil, nil
return true
end

local pat, names = fetch_pat(route.path_org)
log_debug("pcre pat: ", pat)
if #names == 0 then
return true, nil, nil
return true
end

local m = re_match(req_path, pat, "jo")
if not m then
return false, nil, nil
return false
end

if m[0] ~= req_path then
return false, nil, nil
return false
end

return true, m, names
Expand Down

0 comments on commit c32baae

Please sign in to comment.