Changeset

13164:1aa83a5667f9

util.jsonschema: Remove wrapper function This was to silence some Teal warning that seems to have gone away.
author Kim Alvefur <zash@zash.se>
date Sat, 17 Jun 2023 17:19:40 +0200
parents 13163:f43d04653bcf
children 13165:9c13c11b199d
files teal-src/prosody/util/jsonschema.tl util/jsonschema.lua
diffstat 2 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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