Skip to content

Commit d20dea1

Browse files
authored
Fix Elixir 1.19.0-rc.0 formatter compatibility (#767)
1 parent deb88c4 commit d20dea1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/surface/formatter/phases/render.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,12 @@ defmodule Surface.Formatter.Phases.Render do
448448
# handle keyword lists, which will be stripped of the outer brackets per surface syntax sugar
449449
"[#{expression}]"
450450
|> Code.format_string!(locals_without_parens: [...: 1])
451-
|> Enum.slice(1..-2//1)
452-
|> to_string()
451+
|> IO.iodata_to_binary()
452+
|> String.slice(1..-2//1)
453453
else
454454
expression
455455
|> Code.format_string!(locals_without_parens: [...: 1])
456-
|> to_string()
456+
|> IO.iodata_to_binary()
457457
end
458458

459459
if length(Keyword.get(opts, :attributes, [])) > 1 do

0 commit comments

Comments
 (0)