Changeset

4744:f478855f4565

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.
author Kim Alvefur <zash@zash.se>
date Thu, 04 Nov 2021 20:13:43 +0100
parents 4743:0a501df823fd
children 4745:d29a295cd165
files mod_rest/jsonmap.lib.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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