Skip to content

Commit

Permalink
Avoid deprecation warning: List.zip -> Enum.zip (#29)
Browse files Browse the repository at this point in the history
```
    warning: List.zip/1 is deprecated. Use Enum.zip/1 instead
    │
 78 │     |> List.zip()
    │             ~
    │
    └─ lib/owl/palette.ex:78:13: Owl.Palette.codes/0
```

Enum.zip/1 is safe since forever afaik - only went back to 1.6 https://github.com/elixir-lang/elixir/blob/ddc554a7efef67f16e462709e7f46662f21f7ab5/lib/elixir/lib/enum.ex#L2711
  • Loading branch information
petermm authored Jan 25, 2025
1 parent 62df633 commit 6087d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/owl/palette.ex
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ defmodule Owl.Palette do
|> List.update_at(-1, fn codes ->
Enum.concat(codes, List.duplicate("", 15))
end)
|> List.zip()
|> Enum.zip()
|> Enum.map(&Tuple.to_list/1)
|> Enum.intersperse("\n")
end
Expand Down

0 comments on commit 6087d71

Please sign in to comment.