Permalink
Browse files

Cosmetic: drop `if` in favour of guard.

  • Loading branch information...
1 parent 2e73ef7 commit 97352b52aee268058f429110249d00d2013162cb @majek majek committed Oct 18, 2011
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/sockjs_session.erl
View
@@ -55,13 +55,10 @@ pop_from_queue(Q) ->
pop_from_queue(TypeAcc, Acc, Q) ->
case queue:peek(Q) of
- empty -> {Acc, Q};
- {value, {Type, _}} -> if TypeAcc =:= any orelse TypeAcc =:= Type ->
- {{value, Val}, Q2} = queue:out(Q),
- pop_from_queue(Type, [Val | Acc], Q2);
- true ->
- {Acc, Q}
- end
+ {value, {Type, _}} when TypeAcc =:= any orelse TypeAcc =:= Type ->
+ {{value, Val}, Q2} = queue:out(Q),
+ pop_from_queue(Type, [Val | Acc], Q2);
+ _ -> {Acc, Q}
end.
spid(SessionId) ->

0 comments on commit 97352b5

Please sign in to comment.