Skip to content

Commit

Permalink
Fix spec for to_timeout/1 (#13755)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuelen authored Aug 2, 2024
1 parent 8f24d45 commit 1b73c49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/elixir/lib/kernel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6211,9 +6211,8 @@ defmodule Kernel do
"""
@doc since: "1.17.0"
@spec to_timeout([component, ...] | timeout() | Duration.t()) :: timeout()
when component: [{unit, non_neg_integer()}, ...],
unit: :week | :day | :hour | :minute | :second | :millisecond
@spec to_timeout([{unit, non_neg_integer()}] | timeout() | Duration.t()) :: timeout()
when unit: :week | :day | :hour | :minute | :second | :millisecond
def to_timeout(duration)

def to_timeout(:infinity), do: :infinity
Expand Down

0 comments on commit 1b73c49

Please sign in to comment.