Skip to content

Commit 8425878

Browse files
author
José Valim
committed
Fix warnings and tests on Elixir/OTP master
1 parent aad70dc commit 8425878

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/gen_stage.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,8 @@ defmodule GenStage do
11081108
@doc """
11091109
The same as `c:GenServer.format_status/2`.
11101110
"""
1111-
@callback format_status(:normal | :terminate, [pdict :: {term, term} | state :: term, ...]) ::
1112-
status :: term
1111+
@callback format_status(:normal | :terminate, [pdict :: {term, term} | (state :: term), ...]) ::
1112+
(status :: term)
11131113

11141114
@optional_callbacks [
11151115
# GenStage

lib/gen_stage/streamer.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ defmodule GenStage.Streamer do
22
@moduledoc false
33
use GenStage
44

5+
def start_link({_, opts} = pair) do
6+
GenStage.start_link(__MODULE__, pair, opts)
7+
end
8+
59
def init({stream, opts}) do
610
continuation =
711
&Enumerable.reduce(stream, &1, fn

test/gen_stage_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ defmodule GenStageTest do
16721672
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
16731673

16741674
ref = Process.monitor(producer)
1675-
assert_received {:DOWN, ^ref, _, _, _}
1675+
assert_receive {:DOWN, ^ref, _, _, _}
16761676
end
16771677

16781678
test "raises on bad options" do

0 commit comments

Comments
 (0)