From 7a7f9f2b64034f85f273301c0e23a0375296cdf9 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 19 Jan 2016 17:14:29 -0500 Subject: [PATCH] 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. --- lib/awful/util.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/awful/util.lua b/lib/awful/util.lua index 005b095e..4157c32a 100644 --- a/lib/awful/util.lua +++ b/lib/awful/util.lua @@ -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