Skip to content

Commit 9c4c4ca

Browse files
committed
fix dialyzer error
lib/language_server/providers/execute_command/manipulate_pipes.ex:293:pattern_match The pattern can never match the type. Pattern: __text, {_acc, _, true} Type: binary() | {:error, binary(), binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | char(), binary() | [] )} | {:incomplete, binary(), binary()}, {bitstring(), boolean(), false}
1 parent 51afb0d commit 9c4c4ca

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -287,32 +287,31 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipes do
287287
end
288288
end
289289

290-
# do_get_pipe_call(text :: utf16 binary, {utf16 binary, has_passed_through_whitespace, should_halt})
291-
defp do_get_pipe_call(text, acc \\ {"", false, false})
290+
# do_get_pipe_call(text :: utf16 binary, {utf16 binary, has_passed_through_whitespace})
291+
defp do_get_pipe_call(text, acc \\ {"", false})
292292

293-
defp do_get_pipe_call(_text, {acc, _, true}), do: acc
294-
defp do_get_pipe_call("", {acc, _, _}), do: acc
293+
defp do_get_pipe_call("", {acc, _}), do: acc
295294

296-
defp do_get_pipe_call(<<?\r::utf16, ?\n::utf16, _::bitstring>>, {acc, true, _}),
295+
defp do_get_pipe_call(<<?\r::utf16, ?\n::utf16, _::bitstring>>, {acc, true}),
297296
do: <<?\r::utf16, ?\n::utf16, acc::bitstring>>
298297

299-
defp do_get_pipe_call(<<0, c::utf8, _::bitstring>>, {acc, true, _})
298+
defp do_get_pipe_call(<<0, c::utf8, _::bitstring>>, {acc, true})
300299
when c in [?\t, ?\v, ?\r, ?\n, ?\s],
301300
do: <<c::utf16, acc::bitstring>>
302301

303-
defp do_get_pipe_call(<<0, ?\r, 0, ?\n, text::bitstring>>, {acc, false, _}),
304-
do: do_get_pipe_call(text, {<<?\r::utf16, ?\n::utf16, acc::bitstring>>, false, false})
302+
defp do_get_pipe_call(<<0, ?\r, 0, ?\n, text::bitstring>>, {acc, false}),
303+
do: do_get_pipe_call(text, {<<?\r::utf16, ?\n::utf16, acc::bitstring>>, false})
305304

306-
defp do_get_pipe_call(<<0, c::utf8, text::bitstring>>, {acc, false, _})
305+
defp do_get_pipe_call(<<0, c::utf8, text::bitstring>>, {acc, false})
307306
when c in [?\t, ?\v, ?\n, ?\s],
308-
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, false, false})
307+
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, false})
309308

310-
defp do_get_pipe_call(<<0, c::utf8, text::bitstring>>, {acc, _, _})
309+
defp do_get_pipe_call(<<0, c::utf8, text::bitstring>>, {acc, _})
311310
when c in [?|, ?>],
312-
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, false, false})
311+
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, false})
313312

314-
defp do_get_pipe_call(<<c::utf16, text::bitstring>>, {acc, _, _}),
315-
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, true, false})
313+
defp do_get_pipe_call(<<c::utf16, text::bitstring>>, {acc, _}),
314+
do: do_get_pipe_call(text, {<<c::utf16, acc::bitstring>>, true})
316315

317316
defp get_function_call_before(head) do
318317
call_without_function_name =

0 commit comments

Comments
 (0)