aboutsummaryrefslogtreecommitdiffstats
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
commitd16104ebd4ea1a5e313367064c6731efb6feed21 (patch)
treee716a675ab9b54a49bde1fce650725cdf3eb30ee
parent13a0eeca1affbd261616ea2ef8d360d71c3e537d (diff)
downloadprosody-d16104ebd4ea1a5e313367064c6731efb6feed21.tar.gz
prosody-d16104ebd4ea1a5e313367064c6731efb6feed21.zip
util.set: Add luacheck annotation for methods not referencing 'self'
-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