util.async: Use wrapper for once runner (thanks luacheck)

remotes/origin/0.11
Kim Alvefur 8 years ago
parent c0912560a4
commit 1ca1c9bb32
  1. 1
      spec/util_async_spec.lua
  2. 2
      util/async.lua

@ -601,6 +601,7 @@ describe("util.async", function()
end);
async.once(f);
assert.spy(f).was.called();
assert.spy(f).was.called_with();
end);
it("should propagate errors", function ()
local function should_error()

@ -231,7 +231,7 @@ do
};
local function once_runner(func) func(); end
function once(func)
local r = runner(func, once_watchers);
local r = runner(once_runner, once_watchers);
return r:run(func);
end
end

Loading…
Cancel
Save