Skip to content

Commit

Permalink
remove: i/1
Browse files Browse the repository at this point in the history
  • Loading branch information
mad42 committed Jun 9, 2021
1 parent 14c6479 commit 68dcb26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/briefly/entry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ defmodule Briefly.Entry do
defp ensure_tmp_dir(tmps) do
{mega, _, _} = :os.timestamp()
[_tmp, _cwd, sub] = tmps
subdir = sub <> "-" <> i(mega)
Enum.find_value(tmps, &write_tmp_dir(&1 <> subdir))
subdir = "#{sub}-#{mega}"
Enum.find_value(tmps, &write_tmp_dir(Path.join(&1, subdir)))
end

defp write_tmp_dir(path) do
Expand Down Expand Up @@ -112,9 +112,6 @@ defmodule Briefly.Entry do
{:too_many_attempts, tmp, attempts}
end

@compile {:inline, i: 1}
defp i(integer), do: Integer.to_string(integer)

defp path(options, tmp) do
time = :erlang.monotonic_time() |> to_string |> String.trim("-")

Expand Down

0 comments on commit 68dcb26

Please sign in to comment.