Software /
code /
prosody
Comparison
util/set.lua @ 6674:a0ce52e11122
util.set: Add luacheck annotation for methods not referencing 'self'
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 06 May 2015 19:51:07 +0100 |
parent | 6673:b123fcd65d2e |
child | 6675:cb5b56ddabfd |
comparison
equal
deleted
inserted
replaced
6673:b123fcd65d2e | 6674:a0ce52e11122 |
---|---|
63 end | 63 end |
64 | 64 |
65 function new(list) | 65 function new(list) |
66 local items = setmetatable({}, items_mt); | 66 local items = setmetatable({}, items_mt); |
67 local set = { _items = items }; | 67 local set = { _items = items }; |
68 | |
69 -- We access the set through an upvalue in these methods, so ignore 'self' being unused | |
70 --luacheck: ignore 212/self | |
68 | 71 |
69 function set:add(item) | 72 function set:add(item) |
70 items[item] = true; | 73 items[item] = true; |
71 end | 74 end |
72 | 75 |