chore: formated with stylua (#564)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2022-01-31 23:36:06 +06:00 committed by GitHub
parent e6e75f5e92
commit dc31077bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -151,8 +151,8 @@ end
---@return any Result of fn. ---@return any Result of fn.
function M.retry_call(fn, args, times) function M.retry_call(fn, args, times)
times = times or 3 times = times or 3
for _=0,times-1 do for _ = 0, times - 1 do
local result = {pcall(fn, unpack(args))} local result = { pcall(fn, unpack(args)) }
if result[1] == true then if result[1] == true then
return unpack(result, 2) return unpack(result, 2)
end end
@ -166,7 +166,7 @@ end
---@return function retry call wraped function ---@return function retry call wraped function
function M.retry_call_wrap(fn, times) function M.retry_call_wrap(fn, times)
return function(...) return function(...)
return M.retry_call(fn, {...}, times) return M.retry_call(fn, { ... }, times)
end end
end end