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
|
||||
-- @tparam table t the container table
|
||||
-- @tparam table set the mixin table
|
||||
-- @treturn table Return `t` for convenience
|
||||
function util.table.merge(t, set)
|
||||
for _, v in ipairs(set) do
|
||||
table.insert(t, v)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue