[Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method
Oleg Babin
olegrok at tarantool.org
Wed Aug 12 16:03:50 MSK 2020
Hi! Thanks for your patch!
I think it shouldn't be placed in "src/lua/trigger.lua". I believe
"src/lua/table.lua" is more appropriate place.
Of course with comment why it should be done e.g. "This require modifies
global "table" module and adds "clear" function to it".
On 28/07/2020 16:52, sergeyb at tarantool.org wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
>
> Import of 'table.clear' module has been removed
> to fix luacheck warning about unused variable in
> commit 3af79e70b5e1e9b1d69b97f3031a299132a02d2f
> and method table.clear() became unavailable in Tarantool.
>
> Part of #5210
> ---
> src/lua/trigger.lua | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/lua/trigger.lua b/src/lua/trigger.lua
> index 1330ecdd4..066329ea6 100644
> --- a/src/lua/trigger.lua
> +++ b/src/lua/trigger.lua
> @@ -1,4 +1,5 @@
> local fun = require('fun')
> +local _ = require('table.clear')
BTW, "require('table.clear')" should be enough without "local _ ="
>
> --
> -- Checks that argument is a callable, i.e. a function or a table
More information about the Tarantool-patches
mailing list