diff --git a/lib/graphql_ws_client/iterator.ex b/lib/graphql_ws_client/iterator.ex index 4701b8c..b84788d 100644 --- a/lib/graphql_ws_client/iterator.ex +++ b/lib/graphql_ws_client/iterator.ex @@ -34,10 +34,8 @@ defmodule GraphQLWSClient.Iterator do |> Opts.new() |> Opts.validate!() - case start_link(opts) do - {:ok, iterator} -> iterator - {:error, error} -> raise error - end + {:ok, iterator} = start_link(opts) + iterator end @spec close(iterator) :: :ok diff --git a/test/graphql_ws_client/iterator_test.exs b/test/graphql_ws_client/iterator_test.exs index 349def8..cbe36c0 100644 --- a/test/graphql_ws_client/iterator_test.exs +++ b/test/graphql_ws_client/iterator_test.exs @@ -9,7 +9,6 @@ defmodule GraphQLWSClient.IteratorTest do alias GraphQLWSClient.Iterator alias GraphQLWSClient.Iterator.Opts alias GraphQLWSClient.Message - alias GraphQLWSClient.SocketError setup :set_mox_from_context setup :verify_on_exit!