From 5ead4102de553047acb50c1201f06b3c84d57e73 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 31 Dec 2021 14:01:12 +0100 Subject: util.stanza: Remove dead code These cases are caught by `check_text(v, ..)` above. Those errors do not contain the attribute however, which would have been nice. --- util/stanza.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/util/stanza.lua b/util/stanza.lua index 23240301..a38f80b3 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -70,11 +70,6 @@ local function check_attr(attr) for k, v in pairs(attr) do check_name(k, "attribute"); check_text(v, "attribute"); - if type(v) ~= "string" then - error("invalid attribute value for '"..k.."': expected string, got "..type(v)); - elseif not valid_utf8(v) then - error("invalid attribute value for '"..k.."': contains invalid utf8"); - end end end end -- cgit v1.2.3