Andrey Sergienko 9 лет назад
Родитель
Сommit
ecd97cb2ea
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      src/avz.erl

+ 1 - 3
src/avz.erl

@@ -8,9 +8,7 @@
 sha(Pass) -> crypto:hmac(wf:config(n2o,hmac,sha256),n2o_secret:secret(),wf:to_binary(Pass)).
 update({K,V},P) -> wf:setkey(K,1,case P of undefined -> []; _P -> _P end,{K,V}).
 
-coalesce(undefined,Y) -> Y;
-coalesce(X,        _) -> X.
-
+coalesce(_,Y) -> Y.
 merge(A,B) -> list_to_tuple([ coalesce(X,Y) || {X,Y} <- lists:zip(tuple_to_list(A),tuple_to_list(B)) ]).
 
 callbacks(Methods) -> [ M:callback()     || M <- Methods].