aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-09-04 11:37:46 +0200
committerLoïc Hoguin <[email protected]>2013-09-04 11:37:46 +0200
commit08d26d6e13a3f6ce9cab480869b66878486bc663 (patch)
tree9f372816a2b362dc4283b7b09e77aa659b3fa5ea
parent50b30bd1b33b9af03bc961da953087c53f8bdac3 (diff)
downloadgun-08d26d6e13a3f6ce9cab480869b66878486bc663.tar.gz
gun-08d26d6e13a3f6ce9cab480869b66878486bc663.tar.bz2
gun-08d26d6e13a3f6ce9cab480869b66878486bc663.zip
Remove unneeded case blocks
-rw-r--r--src/gun_spdy.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gun_spdy.erl b/src/gun_spdy.erl
index 6eacb73..eefcdd2 100644
--- a/src/gun_spdy.erl
+++ b/src/gun_spdy.erl
@@ -239,16 +239,10 @@ new_stream(StreamID, StreamRef, In, Out, Version,
State#spdy_state{streams=[New|Streams]}.
get_stream_by_id(StreamID, #spdy_state{streams=Streams}) ->
- case lists:keyfind(StreamID, #stream.id, Streams) of
- false -> false;
- S -> S
- end.
+ lists:keyfind(StreamID, #stream.id, Streams).
get_stream_by_ref(StreamRef, #spdy_state{streams=Streams}) ->
- case lists:keyfind(StreamRef, #stream.ref, Streams) of
- false -> false;
- S -> S
- end.
+ lists:keyfind(StreamRef, #stream.ref, Streams).
delete_stream(StreamID, State=#spdy_state{streams=Streams}) ->
Streams2 = lists:keydelete(StreamID, #stream.id, Streams),