File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -119,28 +119,6 @@ defmodule GRPC.Stream do
119
119
def unary ( input , opts \\ [ ] ) when is_struct ( input ) ,
120
120
do: build_grpc_stream ( [ input ] , Keyword . merge ( opts , unary: true ) )
121
121
122
- @ doc """
123
- Wraps an existing `Flow` into a `GRPC.Stream` struct.
124
-
125
- > Note: `:join_with` is not supported in this mode and will raise an error if passed.
126
-
127
- ## Parameters
128
-
129
- - `flow`: A valid `Flow` pipeline.
130
-
131
- ## Returns
132
-
133
- A `%GRPC.Stream{}` struct wrapping the flow.
134
- """
135
- @ spec from_flow! ( Flow . t ( ) , Keyword . t ( ) ) :: t ( )
136
- def from_flow! ( % Flow { } = flow , opts \\ [ ] ) do
137
- if Keyword . has_key? ( opts , :join_with ) do
138
- raise ArgumentError , "join_with option is not supported for Flow input"
139
- end
140
-
141
- % __MODULE__ { flow: flow , options: opts }
142
- end
143
-
144
122
@ doc """
145
123
Extracts the internal `Flow` pipeline from a `GRPC.Stream`.
146
124
Original file line number Diff line number Diff line change @@ -74,15 +74,6 @@ defmodule GRPC.StreamTest do
74
74
result = stream |> GRPC.Stream . map ( & ( & 1 * 2 ) ) |> GRPC.Stream . to_flow ( ) |> Enum . to_list ( )
75
75
assert Enum . sort ( result ) == [ 2 , 4 , 6 ]
76
76
end
77
-
78
- test "converts from Flow to GRPC.Stream" do
79
- flow = Flow . from_enumerable ( [ 1 , 2 , 3 ] , max_demand: 1 )
80
- stream = GRPC.Stream . from_flow! ( flow )
81
- assert % GRPC.Stream { flow: ^ flow } = stream
82
-
83
- result = stream |> GRPC.Stream . map ( & ( & 1 * 2 ) ) |> GRPC.Stream . to_flow ( ) |> Enum . to_list ( )
84
- assert Enum . sort ( result ) == [ 2 , 4 , 6 ]
85
- end
86
77
end
87
78
88
79
describe "ask/3 with pid" do
You can’t perform that action at this time.
0 commit comments