Skip to content

Commit

Permalink
Make keep_fun/2 private (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasspilka authored Oct 10, 2022
1 parent 578be9c commit 2c298dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/telemetry_metrics.ex
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@ defmodule Telemetry.Metrics do
"either the keep or drop option may be set, but not both"
end

def keep_fun(nil, nil), do: nil
def keep_fun(nil, drop), do: fn meta -> not drop.(meta) end
def keep_fun(keep, nil), do: keep
defp keep_fun(nil, nil), do: nil
defp keep_fun(nil, drop), do: fn meta -> not drop.(meta) end
defp keep_fun(keep, nil), do: keep

@spec fill_in_default_metric_options([metric_option()]) :: [metric_option()]
defp fill_in_default_metric_options(options) do
Expand Down

0 comments on commit 2c298dc

Please sign in to comment.