Permalink
Browse files

Pattern matching improvement

  • Loading branch information...
1 parent 59d9b57 commit 41a86e5793231c0a3e97fdeb4315601819323d26 Fernando 'Brujo' Benavides committed Dec 23, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/erldis.erl
View
@@ -321,10 +321,10 @@ zunionstore(Client, DestKey, Sources, Aggregate)->
zsetstore(Command, Client, DestKey, Sources, Aggregate)->
NumKeys = length(Sources),
{AllKeys, AllWeights} = lists:foldl(
- fun(Key, {Keys, Weights})->
- {[Key|Keys], [<<"1">>|Weights]};
- ({Key, Weight}, {Keys, Weights})->
- {[Key|Keys], [Weight|Weights]}
+ fun({Key, Weight}, {Keys, Weights})->
+ {[Key|Keys], [Weight|Weights]};
+ (Key, {Keys, Weights})->
+ {[Key|Keys], [<<"1">>|Weights]}
end, {[], []}, Sources),
Cmd = [Command,DestKey, NumKeys, AllKeys, <<"weights">>,AllWeights, <<"aggregate">>, Aggregate],
numeric(erldis_client:sr_scall(Client, Cmd)).

0 comments on commit 41a86e5

Please sign in to comment.