unpack > table.unpack

This commit is contained in:
Kan18 2019-07-19 17:26:18 -04:00 committed by GitHub
parent 258a14b9e2
commit 3a0c854bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ end
function Util.byteArrayToHex(tbl)
if not tbl then error('byteArrayToHex: invalid table', 2) end
return ("%02x"):rep(#tbl):format(unpack(tbl))
return ("%02x"):rep(#tbl):format(table.unpack(tbl))
end
function Util.tryTimed(timeout, f, ...)
@ -39,10 +39,10 @@ function Util.tryTimes(attempts, f, ...)
for _ = 1, attempts do
result = { f(...) }
if result[1] then
return unpack(result)
return table.unpack(result)
end
end
return unpack(result)
return table.unpack(result)
end
function Util.timer()