From 68dcb2617922ce4fae3d0dd75c550850695150e4 Mon Sep 17 00:00:00 2001 From: mad Date: Wed, 9 Jun 2021 11:08:13 +0000 Subject: [PATCH] remove: i/1 --- lib/briefly/entry.ex | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/briefly/entry.ex b/lib/briefly/entry.ex index c38f0e9..68b782e 100644 --- a/lib/briefly/entry.ex +++ b/lib/briefly/entry.ex @@ -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 @@ -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("-")