[Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 24 01:32:12 MSK 2020
On 23/03/2020 07:42, Oleg Babin wrote:
> On 22/03/2020 22:13, Vladislav Shpilevoy wrote:
>>>> +
>>>> +local function service_call(...)
>>>> + local service_name = select(1, ...)
>>>> + return service_call_api[service_name](select(2, ...))
>>>> +end
>>>
>
> What's about a following diff?
> ============
> diff --git a/vshard/storage/init.lua b/vshard/storage/init.lua
> index 6aa5d6a..3653914 100644
> --- a/vshard/storage/init.lua
> +++ b/vshard/storage/init.lua
> @@ -2203,9 +2203,8 @@ service_call_api = setmetatable({
> return res
> end})
>
> -local function service_call(...)
> - local service_name = select(1, ...)
> - return service_call_api[service_name](select(2, ...))
> +local function service_call(service_name, ...)
> + return service_call_api[service_name](...)
> end
> ============
Indeed, that looks better. I missed that I could declare
first argument separately. Applied.
More information about the Tarantool-patches
mailing list