aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-11-15 14:48:59 +0100
committerKim Alvefur <zash@zash.se>2020-11-15 14:48:59 +0100
commitb45a4a42475c0ccdc341be023d95206716fd22b9 (patch)
tree6b3a1ea952a471dbc2ac568ba4a39c95ffb99992 /util
parent8ae67fb1fd4ed21346a7afd8767dd634344b39ee (diff)
downloadprosody-b45a4a42475c0ccdc341be023d95206716fd22b9.tar.gz
prosody-b45a4a42475c0ccdc341be023d95206716fd22b9.zip
util.hashring: Normalize indentation to tabs
Diffstat (limited to 'util')
-rw-r--r--util/hashring.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/hashring.lua b/util/hashring.lua
index 322bc005..d4555669 100644
--- a/util/hashring.lua
+++ b/util/hashring.lua
@@ -1,13 +1,13 @@
local function generate_ring(nodes, num_replicas, hash)
local new_ring = {};
- for _, node_name in ipairs(nodes) do
- for replica = 1, num_replicas do
- local replica_hash = hash(node_name..":"..replica);
- new_ring[replica_hash] = node_name;
- table.insert(new_ring, replica_hash);
- end
- end
- table.sort(new_ring);
+ for _, node_name in ipairs(nodes) do
+ for replica = 1, num_replicas do
+ local replica_hash = hash(node_name..":"..replica);
+ new_ring[replica_hash] = node_name;
+ table.insert(new_ring, replica_hash);
+ end
+ end
+ table.sort(new_ring);
return new_ring;
end