Skip to content

Commit

Permalink
Update lib/meta_logger/slicer/utf8_impl.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Fernando Hamasaki de Amorim <[email protected]>
  • Loading branch information
Ivor and prodis authored Nov 19, 2024
1 parent 27da344 commit a7bbb1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/meta_logger/slicer/utf8_impl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ defmodule MetaLogger.Slicer.Utf8Impl do
do: [reconstruct_current_slice_as_binary(partial_slice) | slices]

@spec reconstruct_current_slice_as_binary([iodata()]) :: binary()
defp reconstruct_current_slice_as_binary(current_slice),
do: IO.iodata_to_binary(Enum.reverse(current_slice))
defp reconstruct_current_slice_as_binary(current_slice) do
current_slice
|> Enum.reverse()
|> IO.iodata_to_binary()
end
end

0 comments on commit a7bbb1d

Please sign in to comment.