From d8789a671bdb47e464ccafce990b118b3341e30a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 6 Apr 2023 16:30:26 +0200 Subject: 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 --- util/set.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') 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) -- cgit v1.2.3