Skip to content

Commit

Permalink
Fix unreferenced module attribute warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed Dec 14, 2024
1 parent 53fac63 commit 490838a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sync-service/lib/electric/config_parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ defmodule Electric.ConfigParser do
with {num, suffix} <- Float.parse(str),
true <- num > 0,
suffix = String.trim(suffix),
true <- suffix == "" or suffix in ~w[ms msec s sec m min] do
true <- suffix == "" or suffix in @time_units do
{:ok, trunc(num * time_multiplier(suffix))}
else
_ -> {:error, "has invalid value: #{inspect(str)}"}
_ -> {:error, "has invalid value: #{inspect(str)}. Must be one of #{inspect(@time_units)}"}
end
end

Expand Down

0 comments on commit 490838a

Please sign in to comment.