Skip to content

Commit ff82e27

Browse files
author
José Valim
committed
Merge pull request #71 from jwarwick/string
Using to_string instead of deprecated to_binary
2 parents 3f3c569 + 98605c9 commit ff82e27

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ex_doc/retriever.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ defmodule ExDoc.Retriever do
189189

190190
defp source_link(source_path, source_url, line) do
191191
source_url = Regex.replace(%r/%{path}/, source_url, source_path)
192-
Regex.replace(%r/%{line}/, source_url, to_binary(line))
192+
Regex.replace(%r/%{line}/, source_url, to_string(line))
193193
end
194194

195195
defp source_path(module, config) do

lib/mix/tasks/docs.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ defmodule Mix.Tasks.Docs do
5252
raise Mix.Error, message: "Extraneous arguments on the command line"
5353
end
5454

55-
project = (Mix.project[:name] || Mix.project[:app]) |> to_binary
55+
project = (Mix.project[:name] || Mix.project[:app]) |> to_string
5656
version = Mix.project[:version] || "dev"
5757
options = Mix.project[:docs] || []
5858

@@ -74,7 +74,7 @@ defmodule Mix.Tasks.Docs do
7474
case opt do
7575
{ :output, arg } -> Keyword.put(acc, :output, arg)
7676
{ :readme, arg } when is_boolean(arg) -> Keyword.put(acc, :readme, arg)
77-
{ opt, _ } -> raise Mix.Error, message: "Unrecognized option: #{to_binary opt}"
77+
{ opt, _ } -> raise Mix.Error, message: "Unrecognized option: #{to_string opt}"
7878
end
7979
end
8080

0 commit comments

Comments
 (0)