aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-04-06 16:30:26 +0200
committerKim Alvefur <zash@zash.se>2023-04-06 16:30:26 +0200
commitd8789a671bdb47e464ccafce990b118b3341e30a (patch)
treeda93ffb7862cdda8496852cf3ae975567276bf84 /util
parenta8a7be217a12b49d3530ae83ff1bb818dfab134b (diff)
downloadprosody-d8789a671bdb47e464ccafce990b118b3341e30a.tar.gz
prosody-d8789a671bdb47e464ccafce990b118b3341e30a.zip
util.set: Change tostring format to {a, b, c}
Makes it easier to make out where the set starts and ends in cases where it may get embedded and tostring()-ed in a log message. { } taken over from util.array for consistency with some other systems syntax for Sets, e.g. Python
Diffstat (limited to 'util')
-rw-r--r--util/set.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/set.lua b/util/set.lua
index a2704f6c..dbff28b4 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -186,7 +186,7 @@ function set_mt.__tostring(set)
for item in pairs(items) do
s[#s+1] = tostring(item);
end
- return t_concat(s, ", ");
+ return "{"..t_concat(s, ", ").."}";
end
function set_mt.__freeze(set)