From 3d2f28b4d6649433bc7d5df70a5e8af4a1b99bbe Mon Sep 17 00:00:00 2001 From: Daniel Hedlund Date: Thu, 8 Nov 2018 15:28:10 -0800 Subject: [PATCH] Fix a couple typespecs in the Cocktail.Span module --- lib/cocktail/span.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cocktail/span.ex b/lib/cocktail/span.ex index 2fb1368..494c040 100644 --- a/lib/cocktail/span.ex +++ b/lib/cocktail/span.ex @@ -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 @@ -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) @@ -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