From 46ecb7e2dc3dd92931c6d9d99fdc9260e83077ff Mon Sep 17 00:00:00 2001 From: david <57832272+jyoui@users.noreply.github.com> Date: Tue, 1 Feb 2022 15:40:35 +0900 Subject: [PATCH] src/ltn12.lua: remove duplicated codes --- src/ltn12.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ltn12.lua b/src/ltn12.lua index f1e05e1..4cb17f5 100644 --- a/src/ltn12.lua +++ b/src/ltn12.lua @@ -11,6 +11,8 @@ local string = require("string") local table = require("table") local unpack = unpack or table.unpack local base = _G +local select = select + local _M = {} if module then -- heuristic for exporting a global package table ltn12 = _M -- luacheck: ignore @@ -22,8 +24,6 @@ _M.source = source _M.sink = sink _M.pump = pump -local unpack = unpack or table.unpack - -- 2048 seems to be better in windows... _M.BLOCKSIZE = 2048 _M._VERSION = "LTN12 1.0.3" @@ -45,7 +45,7 @@ end -- (thanks to Wim Couwenberg) function filter.chain(...) local arg = {...} - local n = base.select('#',...) + local n = select('#',...) local top, index = 1, 1 local retry = "" return function(chunk)