Software /
code /
prosody
Diff
util/iterators.lua @ 9688:eade1316728e
util.iterators: Use pack from table.pack
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Dec 2018 16:36:05 +0100 |
parent | 9327:f6f1dec164b5 |
child | 12589:39ae08180c81 |
line wrap: on
line diff
--- 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;