Browse Source

Fix compile error due to bad spec

OTP fixed a bug that leads to the bad spec no longer compiling.
Fix is expected to land in OTP-26.0.
Loïc Hoguin 2 years ago
parent
commit
6029041982
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/cow_sse.erl

+ 3 - 2
src/cow_sse.erl

@@ -52,8 +52,9 @@ init() ->
 
 %% @todo Add a function to retrieve the retry value from the state.
 
--spec parse(binary(), state())
-	-> {event, parsed_event(), State} | {more, State}.
+-spec parse(binary(), State)
+	-> {event, parsed_event(), State} | {more, State}
+	when State::state().
 parse(Data0, State=#state{state_name=bom, buffer=Buffer}) ->
 	Data1 = case Buffer of
 		<<>> -> Data0;