Skip to content

Commit

Permalink
Fix traverse_and_update/3 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Willian Frantz authored and WLSF committed Oct 31, 2022
1 parent ab7acea commit 373d840
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/floki.ex
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ defmodule Floki do
"""

@spec traverse_and_update(
html_tree(),
(html_tag() | html_comment() | html_doctype() | html_declaration() -> html_node() | nil)
) :: html_tree()
html_node() | html_tree(),
(html_node() -> html_node() | nil)
) :: html_node() | html_tree()

defdelegate traverse_and_update(html_tree, fun), to: Floki.Traversal

Expand Down Expand Up @@ -455,11 +455,11 @@ defmodule Floki do
"""

@spec traverse_and_update(
html_tree(),
html_node() | html_tree(),
traverse_acc,
(html_tag() | html_comment() | html_doctype() | html_declaration(), traverse_acc ->
(html_node(), traverse_acc ->
{html_node() | nil, traverse_acc})
) :: {html_node(), traverse_acc}
) :: {html_node() | html_tree(), traverse_acc}
when traverse_acc: any()
defdelegate traverse_and_update(html_tree, acc, fun), to: Floki.Traversal

Expand Down

0 comments on commit 373d840

Please sign in to comment.