util.promise: Switch order of parameters to join()

This saves awkward fiddlery with varargs and also echoes the
signature of pcall/xpcall.
This commit is contained in:
Matthew Wild 2021-03-25 15:08:22 +00:00
parent fec0d44e89
commit d1ccd87d55
2 changed files with 4 additions and 6 deletions

View file

@ -498,10 +498,10 @@ describe("util.promise", function ()
local res1, res2;
local p1, p2 = promise.new(function (resolve) r1 = resolve end), promise.new(function (resolve) r2 = resolve end);
local p = promise.join(p1, p2, function (_res1, _res2)
local p = promise.join(function (_res1, _res2)
res1, res2 = _res1, _res2;
return promise.resolve("works");
end);
end, p1, p2);
local result;
local cb = spy.new(function (v)