# HG changeset patch # User Kim Alvefur # Date 1636053223 -3600 # Node ID f478855f456589b655626b8bbe57cefdcc793093 # Parent 0a501df823fd226c58382b5dea420264d97df83d mod_rest: Stop search when an implied type is determined Optimization only, as the iteration order is undefined. And not much since there's not that many entries in the implied_types map. diff -r 0a501df823fd -r f478855f4565 mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Thu Nov 04 20:04:13 2021 +0100 +++ b/mod_rest/jsonmap.lib.lua Thu Nov 04 20:13:43 2021 +0100 @@ -478,6 +478,7 @@ for k, implied in pairs(implied_types) do if t[k] then t_type = implied; + break; end end end