# HG changeset patch # User Kim Alvefur # Date 1751537693 -7200 # Node ID ebcf612da2b1f5a85f73c01219ee2db9627e6f2b # Parent 63ef69b2f0464724c866ad94eeb949fae2010792 mod_http_oauth2: Use numeric for loop instead of ipairs Pedantic attempted optimization, reducing function calls. I didn't even measure, only vaguely recall that this is faster in PUC Lua. diff -r 63ef69b2f046 -r ebcf612da2b1 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Wed Jul 02 16:15:32 2025 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Thu Jul 03 12:14:53 2025 +0200 @@ -29,8 +29,8 @@ end local function array_contains(haystack, needle) - for _, item in ipairs(haystack) do - if item == needle then + for i = 1, #haystack do + if haystack[i] == needle then return true end end