aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-08-29 15:07:00 +0100
committerMatthew Wild <mwild1@gmail.com>2010-08-29 15:07:00 +0100
commita69205c3b9c92f091221a9f7c56dd92a0ee6cac0 (patch)
tree0d106daedab6ac7cf0a26a512f712c1e1b379330
parentaa509f9fced444535e69471224c1b5df70b31e6f (diff)
downloadprosody-a69205c3b9c92f091221a9f7c56dd92a0ee6cac0.tar.gz
prosody-a69205c3b9c92f091221a9f7c56dd92a0ee6cac0.zip
util.stanza: Optimisation, remove useless if...then in stanza:children() iterator
-rw-r--r--util/stanza.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index e787cacf..3ab4bb42 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -122,8 +122,7 @@ function stanza_mt:children()
local i = 0;
return function (a)
i = i + 1
- local v = a[i]
- if v then return v; end
+ return a[i];
end, self, i;
end