Skip to content

Commit

Permalink
#215: Optimize new expects creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsolt Laky committed Dec 5, 2020
1 parent a754aa9 commit 743f817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/meck_proc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ store_expect(Mod, FuncAri, Expect, Expects, true, PassThrough, CanExpect) ->
true ->
RevExistingClauses = lists:reverse(ExistingClauses),
[PassthroughClause | OldClauses] = RevExistingClauses,
lists:reverse(OldClauses, NewClauses) ++
[PassthroughClause]
lists:reverse(OldClauses,
NewClauses ++ [PassthroughClause])
end,
dict:store(FuncAri, {FuncAri, ToStore}, Expects);
dict:store(FuncAri, {FuncAri, ToStore}, Expects);
false -> dict:store(FuncAri, Expect, Expects)
end,
{compile_expects_if_needed(Mod, NewExpects, PassThrough, CanExpect),
Expand Down

0 comments on commit 743f817

Please sign in to comment.