mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Removed some unused iterator vars
This commit is contained in:
parent
bf32432dac
commit
faa5d8252f
8
lume.lua
8
lume.lua
@ -170,7 +170,7 @@ end
|
|||||||
|
|
||||||
function lume.clear(t)
|
function lume.clear(t)
|
||||||
local iter = getiter(t)
|
local iter = getiter(t)
|
||||||
for k, _ in iter(t) do
|
for k in iter(t) do
|
||||||
t[k] = nil
|
t[k] = nil
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
@ -284,7 +284,7 @@ end
|
|||||||
|
|
||||||
function lume.set(t)
|
function lume.set(t)
|
||||||
local rtn = {}
|
local rtn = {}
|
||||||
for k, _ in pairs(lume.invert(t)) do
|
for k in pairs(lume.invert(t)) do
|
||||||
rtn[#rtn + 1] = k
|
rtn[#rtn + 1] = k
|
||||||
end
|
end
|
||||||
return rtn
|
return rtn
|
||||||
@ -433,7 +433,7 @@ end
|
|||||||
function lume.keys(t)
|
function lume.keys(t)
|
||||||
local rtn = {}
|
local rtn = {}
|
||||||
local iter = getiter(t)
|
local iter = getiter(t)
|
||||||
for k, _ in iter(t) do rtn[#rtn + 1] = k end
|
for k in iter(t) do rtn[#rtn + 1] = k end
|
||||||
return rtn
|
return rtn
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -679,7 +679,7 @@ function lume.hotswap(modname)
|
|||||||
end
|
end
|
||||||
local err = nil
|
local err = nil
|
||||||
local function onerror(e)
|
local function onerror(e)
|
||||||
for k, _ in pairs(_G) do _G[k] = oldglobal[k] end
|
for k in pairs(_G) do _G[k] = oldglobal[k] end
|
||||||
err = lume.trim(e)
|
err = lume.trim(e)
|
||||||
end
|
end
|
||||||
local ok, oldmod = pcall(require, modname)
|
local ok, oldmod = pcall(require, modname)
|
||||||
|
Loading…
Reference in New Issue
Block a user