util.jsonschema: Remove wrapper function
authorKim Alvefur <zash@zash.se>
Sat, 17 Jun 2023 17:19:40 +0200
changeset 13168 1aa83a5667f9
parent 13167 f43d04653bcf
child 13169 9c13c11b199d
util.jsonschema: Remove wrapper function This was to silence some Teal warning that seems to have gone away.
teal-src/prosody/util/jsonschema.tl
util/jsonschema.lua
--- a/teal-src/prosody/util/jsonschema.tl	Sat Jun 17 17:17:44 2023 +0200
+++ b/teal-src/prosody/util/jsonschema.tl	Sat Jun 17 17:19:40 2023 +0200
@@ -159,17 +159,10 @@
 	end
 end
 
-local complex_validate : function ( json_schema_object, any, json_schema_object ) : boolean
-
 local function validate (schema : schema_t, data : any, root : json_schema_object) : boolean
 	if schema is boolean then
 		return schema
-	else
-		return complex_validate(schema, data, root)
 	end
-end
-
-function complex_validate (schema : json_schema_object, data : any, root : json_schema_object) : boolean
 
 	if root == nil then
 		root = schema
--- a/util/jsonschema.lua	Sat Jun 17 17:17:44 2023 +0200
+++ b/util/jsonschema.lua	Sat Jun 17 17:19:40 2023 +0200
@@ -43,17 +43,10 @@
 	end
 end
 
-local complex_validate
-
 local function validate(schema, data, root)
 	if type(schema) == "boolean" then
 		return schema
-	else
-		return complex_validate(schema, data, root)
 	end
-end
-
-function complex_validate(schema, data, root)
 
 	if root == nil then
 		root = schema