if instead of case for a guard comparison
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666429 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/alterl/src/thrift_client.erl b/lib/alterl/src/thrift_client.erl
index c1d43aa..e1e78e7 100644
--- a/lib/alterl/src/thrift_client.erl
+++ b/lib/alterl/src/thrift_client.erl
@@ -141,10 +141,10 @@
Args) ->
Params = Service:function_info(Function, params_type),
{struct, PList} = Params,
- case length(PList) of
- N when N =/= length(Args) ->
+ if
+ length(PList) =/= length(Args) ->
throw({return, {error, {bad_args, Function, Args}}});
- _ -> ok
+ true -> ok
end,
Begin = #protocol_message_begin{name = atom_to_list(Function),
@@ -182,7 +182,6 @@
handle_reply(State, Function, ReplyType)
end.
-
handle_reply(State = #state{protocol = Proto,
service = Service},
Function,