Skip to content

Commit 87d2a7d

Browse files
committed
Use RDF.PrefixMap.to_sorted_list/1 from RDF.ex v1.2
1 parent 2b2ea1b commit 87d2a7d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rdf/xml/encoder.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ defmodule RDF.XML.Encoder do
161161

162162
defp ns_declarations(prefixes, nil, _) do
163163
prefixes
164-
|> PrefixMap.to_list()
165-
|> Enum.sort(fn {prefix1, _}, {prefix2, _} -> prefix1 < prefix2 end)
164+
|> PrefixMap.to_sorted_list()
166165
|> Enum.map(fn
167166
{nil, namespace} -> {"xmlns", to_string(namespace)}
168167
{prefix, namespace} -> {"xmlns:#{prefix}", to_string(namespace)}

0 commit comments

Comments
 (0)