mirror of
https://github.com/kikito/cron.lua.git
synced 2024-12-19 18:34:20 +00:00
use metatables when needed
This commit is contained in:
parent
a0e6c86a7b
commit
5d57e27a27
2
cron.lua
2
cron.lua
@ -21,7 +21,7 @@ local function checkTimeAndCallback(time, callback)
|
|||||||
assert(isCallable(callback), "callback must be a function")
|
assert(isCallable(callback), "callback must be a function")
|
||||||
end
|
end
|
||||||
|
|
||||||
local entries = {}
|
local entries = setmetatable({}, {__mode = "k"})
|
||||||
|
|
||||||
local function newEntry(time, callback, update, ...)
|
local function newEntry(time, callback, update, ...)
|
||||||
local entry = {
|
local entry = {
|
||||||
|
Loading…
Reference in New Issue
Block a user