[Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method

Sergey Bronnikov sergeyb at tarantool.org
Mon Aug 31 14:18:28 MSK 2020


Hi, Oleg!
Thanks for review!

On 16:03 Wed 12 Aug , Oleg Babin wrote:
> 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.

Agree, "src/lua/table.lua" is more appropriate place for it, updated.

> Of course with comment why it should be done e.g. "This require modifies
> global "table" module and adds "clear" function to it".

Done.

> 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 _ ="

Removed it.

> >   --
> >   -- Checks that argument is a callable, i.e. a function or a table

-- 
sergeyb@


More information about the Tarantool-patches mailing list