Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Removed unsafe var warnings (Elixir 1.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Quinn committed Jun 24, 2016
1 parent 202a9d5 commit 8627cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ex_statsd.ex
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ defmodule ExStatsD do
{time, value} = :timer.tc(fun)
amount = time / 1000.0
# We should hard code the amount when we are in test mode.
if Application.get_env(:ex_statsd, :test_mode, false), do: amount = @timing_stub
amount = if Application.get_env(:ex_statsd, :test_mode, false), do: @timing_stub, else: amount
{metric, amount, :ms} |> transmit(options, rate)
value
_ ->
Expand Down Expand Up @@ -236,7 +236,7 @@ defmodule ExStatsD do
{time, value} = :timer.tc(fun)
amount = time / 1000.0
# We should hard code the amount when we are in test mode.
if Application.get_env(:ex_statsd, :test_mode, false), do: amount = @timing_stub
amount = if Application.get_env(:ex_statsd, :test_mode, false), do: @timing_stub, else: amount
{metric, amount, :h} |> transmit(options, rate)
value
_ ->
Expand Down

0 comments on commit 8627cae

Please sign in to comment.