util.iterators: Use pack from table.pack
authorKim Alvefur <zash@zash.se>
Sat, 08 Dec 2018 16:36:05 +0100
changeset 9692 eade1316728e
parent 9691 8c92ef4270c9
child 9693 9e2ee40b4a0a
util.iterators: Use pack from table.pack
util/iterators.lua
--- a/util/iterators.lua	Sat Dec 08 16:35:39 2018 +0100
+++ b/util/iterators.lua	Sat Dec 08 16:36:05 2018 +0100
@@ -11,9 +11,9 @@
 local it = {};
 
 local t_insert = table.insert;
-local select, next = select, next;
-local unpack = table.unpack or unpack; --luacheck: ignore 113 143
-local pack = table.pack or function (...) return { n = select("#", ...), ... }; end -- luacheck: ignore 143
+local next = next;
+local unpack = table.unpack or unpack; --luacheck: ignore 113
+local pack = table.pack or require "util.table".pack;
 local type = type;
 local table, setmetatable = table, setmetatable;