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 | bd8755411c872988afb0343e0e39492f280d8a90 (patch) | |
tree | c55d968821a48f4da0260a7c05e208b2c4884207 | |
parent | 8eb7b73968209de2031d534abad17045f956a35e (diff) | |
download | prosody-bd8755411c872988afb0343e0e39492f280d8a90.tar.gz prosody-bd8755411c872988afb0343e0e39492f280d8a90.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) |