wip(growth): change from with
to case
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
58f14c0346
commit
2fedb4ecf0
@ -228,10 +228,12 @@ defmodule Growth.Indicators.Download do
|
||||
end
|
||||
|
||||
def fetch!(url) do
|
||||
with {:ok, %{status: 200, body: body}} <- Req.get(url) do
|
||||
body
|
||||
else
|
||||
_ -> raise("fetch failed for url #{url}")
|
||||
case Req.get(url) do
|
||||
{:ok, %{status: 200, body: body}} ->
|
||||
body
|
||||
|
||||
_ ->
|
||||
raise("fetch failed for url #{url}")
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user