[tarantool-patches] Re: [PATCH 1/3] box/console: Don't allow arguments in get_default_output
Cyrill Gorcunov
gorcunov at gmail.com
Mon Jul 29 00:43:44 MSK 2019
On Sun, Jul 28, 2019 at 09:44:22PM +0300, Konstantin Osipov wrote:
> * 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.
Good point, thanks!
> > + if args ~= nil then
> > + error("Arguments provided while prohibited")
>
> error("This function accepts no arguments")
OK
> > + end
> > return default_output_format
> > end
>
> Please add a test case.
> Otherwise lgtm.
Will rework and resend.
More information about the Tarantool-patches
mailing list