awful.util: Make 'util.table.merge' return the table
This avoid having to add a temporary variable when returning from functions. Qt does the same.
This commit is contained in:
parent
4556728b99
commit
7a7f9f2b64
|
@ -571,10 +571,12 @@ end
|
||||||
--- Merge items from the one table to another one
|
--- Merge items from the one table to another one
|
||||||
-- @tparam table t the container table
|
-- @tparam table t the container table
|
||||||
-- @tparam table set the mixin table
|
-- @tparam table set the mixin table
|
||||||
|
-- @treturn table Return `t` for convenience
|
||||||
function util.table.merge(t, set)
|
function util.table.merge(t, set)
|
||||||
for _, v in ipairs(set) do
|
for _, v in ipairs(set) do
|
||||||
table.insert(t, v)
|
table.insert(t, v)
|
||||||
end
|
end
|
||||||
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue