aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-05-06 19:51:07 +0100
committerMatthew Wild <mwild1@gmail.com>2015-05-06 19:51:07 +0100
commitb496bcc379412e8b51baed715bef12d946854fbb (patch)
treee716a675ab9b54a49bde1fce650725cdf3eb30ee /util
parentf1085b6cebb50e045430c68ef2bcbebcfaeac9cc (diff)
downloadprosody-b496bcc379412e8b51baed715bef12d946854fbb.tar.gz
prosody-b496bcc379412e8b51baed715bef12d946854fbb.zip
util.set: Add luacheck annotation for methods not referencing 'self'
Diffstat (limited to 'util')
-rw-r--r--util/set.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/set.lua b/util/set.lua
index c160d28e..0a263440 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -66,6 +66,9 @@ function new(list)
local items = setmetatable({}, items_mt);
local set = { _items = items };
+ -- We access the set through an upvalue in these methods, so ignore 'self' being unused
+ --luacheck: ignore 212/self
+
function set:add(item)
items[item] = true;
end