From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4733543040D for ; Mon, 31 Aug 2020 14:18:30 +0300 (MSK) Date: Mon, 31 Aug 2020 14:18:28 +0300 From: Sergey Bronnikov Message-ID: <20200831111828.GD94343@pony.bronevichok.ru> References: <1f495519687c8e037c638ccabab28e23882a41df.1595943364.git.sergeyb@tarantool.org> <0f75a16f-c1a7-992b-29fb-54358861cd70@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0f75a16f-c1a7-992b-29fb-54358861cd70@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Babin Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org 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@tarantool.org wrote: > > From: Sergey Bronnikov > > > > 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@