From bd8755411c872988afb0343e0e39492f280d8a90 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 3 Sep 2013 12:21:43 +0100 Subject: 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. --- util/set.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3