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:
Emmanuel Lepage Vallee 2016-01-19 17:14:29 -05:00
parent 4556728b99
commit 7a7f9f2b64
1 changed files with 2 additions and 0 deletions

View File

@ -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