Skip to content

Commit 40689c4

Browse files
committed
removed duplicate tbl_copy from bad merge
1 parent 536902d commit 40689c4

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

lib/resty/redis/connector.lua

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,6 @@ local function tbl_copy(orig)
5050
end
5151

5252

53-
-- Returns a new table, recursively copied from the one given, retaining
54-
-- metatable assignment.
55-
--
56-
-- @param table table to be copied
57-
-- @return table
58-
local function tbl_copy(orig)
59-
local orig_type = type(orig)
60-
local copy
61-
if orig_type == "table" then
62-
copy = {}
63-
for orig_key, orig_value in next, orig, nil do
64-
copy[tbl_copy(orig_key)] = tbl_copy(orig_value)
65-
end
66-
setmetatable(copy, tbl_copy(getmetatable(orig)))
67-
else -- number, string, boolean, etc
68-
copy = orig
69-
end
70-
return copy
71-
end
72-
73-
7453
-- Returns a new table, recursively copied from the combination of the given
7554
-- table `t1`, with any missing fields copied from `defaults`.
7655
--

0 commit comments

Comments
 (0)