Skip to content

Commit

Permalink
Minor refactoring in has_call, changed {M, F, A} to MFA.
Browse files Browse the repository at this point in the history
  • Loading branch information
daha committed Oct 1, 2011
1 parent 62b6899 commit b538f91
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/meck.erl
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,13 @@ cleanup(Mod) ->

%% --- History utilities -------------------------------------------------------

has_call({_M, _F, _A}, []) -> false;
has_call({M, F, A}, [{{M, F, A}, _Result} | _Rest]) ->
has_call(MFA, []) -> false;
has_call(MFA, [{MFA, _Result} | _Rest]) ->
true;
has_call({M, F, A}, [{{M, F, A}, _ExType, _Exception, _Stack} | _Rest]) ->
has_call(MFA, [{MFA, _ExType, _Exception, _Stack} | _Rest]) ->
true;
has_call({M, F, A}, [_Call | Rest]) ->
has_call({M, F, A}, Rest).
has_call(MFA, [_Call | Rest]) ->
has_call(MFA, Rest).

i_count_calls(_MFA, [], Count) ->
Count;
Expand Down

0 comments on commit b538f91

Please sign in to comment.