Skip to content

Commit

Permalink
Merge pull request #66 from dhedlund/bump-dialyxir
Browse files Browse the repository at this point in the history
Fix a couple typespecs in Cocktail.Span
  • Loading branch information
doughsay authored Nov 8, 2018
2 parents 0317d86 + 3d2f28b commit 8bd6d5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/cocktail/span.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule Cocktail.Span do
| :is_inside
| :is_before
| :is_after
| :is_equal_to
| :overlaps_the_start_of
| :overlaps_the_end_of

Expand Down Expand Up @@ -59,7 +60,7 @@ defmodule Cocktail.Span do
...> compare(span1, span2)
1
"""
@spec compare(span_compat, t) :: Timex.Comparable.compare_result()
@spec compare(span_compat, span_compat) :: Timex.Comparable.compare_result()
def compare(%{from: t, until: until1}, %{from: t, until: until2}), do: Timex.compare(until1, until2)
def compare(%{from: from1}, %{from: from2}), do: Timex.compare(from1, from2)

Expand Down Expand Up @@ -88,7 +89,7 @@ defmodule Cocktail.Span do
...> overlap_mode(span1, span2)
:is_before
"""
@spec overlap_mode(span_compat, t) :: overlap_mode
@spec overlap_mode(span_compat, span_compat) :: overlap_mode
def overlap_mode(%{from: from, until: until}, %{from: from, until: until}), do: :is_equal_to

# credo:disable-for-next-line
Expand Down

0 comments on commit 8bd6d5e

Please sign in to comment.