ljust is being deprecated

This commit is contained in:
Felipe Sere
2019-01-05 11:14:54 +00:00
parent 82b4eb1766
commit 0f72a98444

View File

@@ -4,7 +4,7 @@ defmodule Display.ProgressBar do
def progress_bar(%{current: current, total: total}) do
arrow = calculate_progress(current, total) |> build_arrow
"|" <> String.ljust(arrow, @progress_bar_length) <> "| #{current} of #{total}"
"|" <> String.pad_trailing(arrow, @progress_bar_length) <> "| #{current} of #{total}"
end
defp calculate_progress(current, total) do