diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-09-03 12:21:43 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-09-03 12:21:43 +0100 |
commit | 01112d1d866c896e7a10da6f2bc06aedfed0ad22 (patch) | |
tree | c55d968821a48f4da0260a7c05e208b2c4884207 | |
parent | c6bf0953e395f36b133e0c2e8cc2ef25e943df7f (diff) | |
download | prosody-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.lua | 2 |
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) |