aboutsummaryrefslogtreecommitdiffstats
path: root/util/promise.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-26 19:32:00 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-26 19:32:00 +0100
commit9b5c6c4d9de2d32a3a0391e6d06a178f21dbb807 (patch)
tree0eff02506e6364d1dcb5c71b2edaacd6662ffe20 /util/promise.lua
parent3bc2c02797799a0e71c4a04dc810d2d683271c42 (diff)
downloadprosody-9b5c6c4d9de2d32a3a0391e6d06a178f21dbb807.tar.gz
prosody-9b5c6c4d9de2d32a3a0391e6d06a178f21dbb807.zip
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
Diffstat (limited to 'util/promise.lua')
-rw-r--r--util/promise.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/promise.lua b/util/promise.lua
index b368f34e..07c9c4dc 100644
--- a/util/promise.lua
+++ b/util/promise.lua
@@ -1,6 +1,8 @@
local promise_methods = {};
local promise_mt = { __name = "promise", __index = promise_methods };
+local xpcall = require "util.xpcall".xpcall;
+
function promise_mt:__tostring()
return "promise (" .. (self._state or "invalid") .. ")";
end