Skip to content

Commit

Permalink
Update thumbnex.ex (#17)
Browse files Browse the repository at this point in the history
Update Slice function to explicitly indicate the increment steps to avoid warnings
  • Loading branch information
jfayad authored Jan 24, 2024
1 parent d1a86c6 commit d8b8284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/thumbnex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ defmodule Thumbnex do
case Path.extname(path) do
"" -> "png"
# remove "."
extname -> String.slice(extname, 1..-1)
extname -> String.slice(extname, 1..-1//1)

Check failure on line 107 in lib/thumbnex.ex

View workflow job for this annotation

GitHub Actions / OTP 20.0 / Elixir 1.9.4

** (SyntaxError) lib/thumbnex.ex:107: syntax error before: '/'
end
end

defp normalize_format(format) do
if String.starts_with?(format, "."), do: String.slice(format, 1..-1), else: format
if String.starts_with?(format, "."), do: String.slice(format, 1..-1//1), else: format
end

defp frame_time(:no_duration), do: 0
Expand Down

0 comments on commit d8b8284

Please sign in to comment.