aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-09-03 12:21:43 +0100
committerMatthew Wild <mwild1@gmail.com>2013-09-03 12:21:43 +0100
commit01112d1d866c896e7a10da6f2bc06aedfed0ad22 (patch)
treec55d968821a48f4da0260a7c05e208b2c4884207
parentc6bf0953e395f36b133e0c2e8cc2ef25e943df7f (diff)
downloadprosody-01112d1d866c896e7a10da6f2bc06aedfed0ad22.tar.gz
prosody-01112d1d866c896e7a10da6f2bc06aedfed0ad22.zip
util.set: :items() now returns an iterator instead of the underlying table. This is much more efficient than 'for item in set' (which still works for now). Current access to _items is generally done directly, this may change.
-rw-r--r--util/set.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/set.lua b/util/set.lua
index a2df669c..89cd7cf3 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -75,7 +75,7 @@ function new(list)
end
function set:items()
- return items;
+ return next, items;
end
function set:remove(item)