aboutsummaryrefslogtreecommitdiffstats
path: root/util/iterators.lua
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2013-08-09 17:48:21 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2013-08-09 17:48:21 +0200
commit4b618a8727365b880e115c6fd53869040c2ad238 (patch)
tree8031ff6fd0e32a78a157f8e6542a954e7e634c5d /util/iterators.lua
parent7dd77281432685907926d50feb2d32c0c2a0ec8c (diff)
downloadprosody-4b618a8727365b880e115c6fd53869040c2ad238.tar.gz
prosody-4b618a8727365b880e115c6fd53869040c2ad238.zip
Remove all trailing whitespace
Diffstat (limited to 'util/iterators.lua')
-rw-r--r--util/iterators.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/iterators.lua b/util/iterators.lua
index 4b429163..aa9c3ec0 100644
--- a/util/iterators.lua
+++ b/util/iterators.lua
@@ -1,7 +1,7 @@
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
---
+--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
@@ -25,7 +25,7 @@ function it.reverse(f, s, var)
if var == nil then break; end
t_insert(results, 1, ret);
end
-
+
-- Then return our reverse one
local i,max = 0, #results;
return function (results)
@@ -56,7 +56,7 @@ end
-- Given an iterator, iterate only over unique items
function it.unique(f, s, var)
local set = {};
-
+
return function ()
while true do
local ret = pack(f(s, var));
@@ -73,13 +73,13 @@ end
--[[ Return the number of items an iterator returns ]]--
function it.count(f, s, var)
local x = 0;
-
+
while true do
var = f(s, var);
if var == nil then break; end
x = x + 1;
end
-
+
return x;
end