[tarantool-patches] Re: [PATCH 1/3] box/console: Don't allow arguments in get_default_output
Konstantin Osipov
kostja at tarantool.org
Sun Jul 28 21:44:22 MSK 2019
* Cyrill Gorcunov <gorcunov at gmail.com> [19/07/27 01:21]:
> -local function get_default_output()
> +local function get_default_output(...)
> + local args = ...
I think it's enough to check for a single argument, variadic
arguments introduce unnecessary overhead.
> + if args ~= nil then
> + error("Arguments provided while prohibited")
error("This function accepts no arguments")
> + end
> return default_output_format
> end
Please add a test case.
Otherwise lgtm.
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list