Apply quokka pipes rule

This commit is contained in:
Claudio Ortolina
2025-05-28 19:48:35 +01:00
parent ff8e27e619
commit 774f1c82e5
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ defmodule LastFm.Session do
doc
end
defp first(node, path), do: node |> xpath(path) |> take_one
defp first(node, path), do: node |> xpath(path) |> take_one()
defp take_one([head | _]), do: head
defp take_one(_), do: nil
@@ -77,7 +77,7 @@ defmodule LastFm.Session do
:xmerl_xpath.string(to_charlist(path), node)
end
def text(node), do: node |> xpath(~c"./text()") |> extract_text
def text(node), do: node |> xpath(~c"./text()") |> extract_text()
defp extract_text([xmlText(value: value)]), do: List.to_string(value)
defp extract_text(_x), do: nil