Skip to content

Commit

Permalink
fix unit typespecs
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Dec 22, 2023
1 parent 707f65f commit a045a8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/benchee/conversion/format.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ defmodule Benchee.Conversion.Format do
# The output is sorted descending by magnitude of units and excludes tuples with place value 0.
# Place values are `non_neg_integer` for non-base units,
# however base unit may also be `float` becuase the decimals can't be split further.
@spec split_into_place_values(number, module) :: [{number, Scale.unit()}]
@spec split_into_place_values(number, module) :: [{number, Unit.t()}]
defp split_into_place_values(number, module) do
descending_units = units_descending(module)

Expand All @@ -101,7 +101,7 @@ defmodule Benchee.Conversion.Format do
|> Enum.sort(&(&1.magnitude >= &2.magnitude))
end

@spec place_values(number, [Scale.unit()]) :: [{number, Scale.unit()}]
@spec place_values(number, [Unit.t()]) :: [{number, Unit.t()}]
defp place_values(0, _units), do: []

# smalles unit, carries the decimal
Expand Down

0 comments on commit a045a8a

Please sign in to comment.