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 | 11b00845512b6af26000bd40dbf9f349f8886535 (patch) | |
tree | 9186c5db947b241b5590afab18bd6e720f95046a /util/format.lua | |
parent | 599acace643b98ea99f64b2544591e65caa9c533 (diff) | |
download | prosody-11b00845512b6af26000bd40dbf9f349f8886535.tar.gz prosody-11b00845512b6af26000bd40dbf9f349f8886535.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() |