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_binary_protocol.erl b/lib/alterl/src/thrift_binary_protocol.erl
index 0525621..633cfba 100644
--- a/lib/alterl/src/thrift_binary_protocol.erl
+++ b/lib/alterl/src/thrift_binary_protocol.erl
@@ -91,8 +91,6 @@
write(This, #protocol_struct_begin{}) -> ok;
write(This, struct_end) -> ok;
-
-
write(This, {bool, true}) -> write(This, {byte, 1});
write(This, {bool, false}) -> write(This, {byte, 0});
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,