diff options
author | Kim Alvefur <zash@zash.se> | 2017-11-10 05:42:32 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-11-10 05:42:32 +0100 |
commit | 1438a3884507b709cba08691d329b0cf137f4bd4 (patch) | |
tree | 9186c5db947b241b5590afab18bd6e720f95046a /util/format.lua | |
parent | 8962abd55b75a572b0e5821f11cd3342e09b113b (diff) | |
download | prosody-1438a3884507b709cba08691d329b0cf137f4bd4.tar.gz prosody-1438a3884507b709cba08691d329b0cf137f4bd4.zip |
util: Various minor changes to please [luacheck]
Diffstat (limited to 'util/format.lua')
-rw-r--r-- | util/format.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/format.lua b/util/format.lua index 5f2b12be..b3296228 100644 --- a/util/format.lua +++ b/util/format.lua @@ -8,7 +8,7 @@ local assert = assert; local unpack = unpack; local type = type; -local function format(format, ...) +local function format(formatstring, ...) local args, args_length = { ... }, select('#', ...); -- format specifier spec: @@ -25,7 +25,7 @@ local function format(format, ...) -- process each format specifier local i = 0; - format = format:gsub("%%[^cdiouxXaAeEfgGqs%%]*[cdiouxXaAeEfgGqs%%]", function(spec) + formatstring = formatstring:gsub("%%[^cdiouxXaAeEfgGqs%%]*[cdiouxXaAeEfgGqs%%]", function(spec) if spec ~= "%%" then i = i + 1; local arg = args[i]; @@ -54,10 +54,10 @@ local function format(format, ...) else args[i] = tostring(arg); end - format = format .. " [%s]" + formatstring = formatstring .. " [%s]" end - return format:format(unpack(args)); + return formatstring:format(unpack(args)); end local function test() |