Elixir 1.18 Replace Tuple.append/2 with Tuple.insert_at/3

warning: Tuple.append/2 is deprecated. Use insert_at instead
     │
 305 │     Enum.reduce(entity, {}, &Tuple.append(&2, to_elixir_types(&1)))
     │                                    ~
     │
     └─ lib/pleroma/config_db.ex:305:36: Pleroma.ConfigDB.to_elixir_types/1
This commit is contained in:
Phantasm 2025-05-12 17:25:38 +02:00
commit 63cbc1208d
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8

View file

@ -302,7 +302,7 @@ defmodule Pleroma.ConfigDB do
end
def to_elixir_types(%{"tuple" => entity}) do
Enum.reduce(entity, {}, &Tuple.append(&2, to_elixir_types(&1)))
Enum.reduce(entity, {}, &Tuple.insert_at(&2, tuple_size(&2), to_elixir_types(&1)))
end
def to_elixir_types(entity) when is_map(entity) do