From 1bbb795a89e2eff1cb5dfa31cba9b92933f5e4b6 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 8 Mar 2014 14:47:27 +0000 Subject: [PATCH] Changed lume.set() to make use of lume.invert() --- lume.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lume.lua b/lume.lua index e4f39fb..6ad7a24 100644 --- a/lume.lua +++ b/lume.lua @@ -134,10 +134,10 @@ end function lume.set(t, retainkeys) - local tmp = {} - for k, v in pairs(t) do tmp[v] = k end local rtn = {} - for k, v in pairs(tmp) do rtn[retainkeys and v or (#rtn + 1)] = k end + for k, v in pairs(lume.invert(t)) do + rtn[retainkeys and v or (#rtn + 1)] = k + end return rtn end