Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/mix/tasks/mneme.install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ defmodule Mix.Tasks.Mneme.Install do
end

defp move_to_def_or_defp(zipper, call_name, arity) do
with :error <- Igniter.Code.Function.move_to_def(zipper, call_name, arity) do
Igniter.Code.Function.move_to_defp(zipper, call_name, arity)
with :error <- Function.move_to_def(zipper, call_name, arity) do
Function.move_to_defp(zipper, call_name, arity)
end
end
end
2 changes: 1 addition & 1 deletion lib/mneme/assertion/context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule Mneme.Assertion.Context do
"""
@spec with_keysets(t) :: t
def with_keysets(%__MODULE__{} = context) do
%__MODULE__{context | keysets: get_keysets(context.original_pattern)}
%{context | keysets: get_keysets(context.original_pattern)}
end

# Keysets are the lists of keys being matched in any map patterns. We
Expand Down
7 changes: 7 additions & 0 deletions lib/mneme/diff/formatter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ defmodule Mneme.Diff.Formatter do
defp to_fmt_instructions(:delimiter, _op, {list, _}) when is_list(list), do: []
defp to_fmt_instructions(:delimiter, _op, {{_, _}, _}), do: []

# blocks don't have user-visible delimiters to highlight
defp to_fmt_instructions(:delimiter, _op, {{:__block__, _meta, _args}, _}), do: []

# final fallback for any other shapes we don't explicitly handle
defp to_fmt_instructions(:delimiter, _op, {_unknown, _}), do: []
defp to_fmt_instructions(:delimiter, _op, _), do: []

defp delimiter_to_fmt_instructions(op, meta, start_len, end_len) do
case meta do
%{line: l, column: c, closing: %{line: l2, column: c2}} ->
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defmodule Mneme.MixProject do
{:rewrite, "~> 1.0"},
{:text_diff, "~> 0.1"},
{:file_system, "~> 1.0"},
{:igniter, "~> 0.5.0 or ~> 0.4.0 or ~> 0.3.76"},
{:igniter, "~> 0.6.0"},

# Development / Test
{:benchee, "~> 1.0", only: :dev},
Expand Down
Loading