Skip to content

Commit

Permalink
Merge pull request #3 from zfletch/to_char_list-deprecations
Browse files Browse the repository at this point in the history
Address String.to_char_list deprecations
  • Loading branch information
plackemacher authored Aug 15, 2017
2 parents 852d0ed + 12150fb commit ebc6d72
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
language: elixir
otp_release:
- 18.3
- 19.2
- 19.3
- 20.0
elixir:
- 1.2.6
- 1.3.4
- 1.4.0
- 1.4.5
- 1.5.1

matrix:
exclude:
- otp_release: 20.0
elixir: 1.3.4
4 changes: 2 additions & 2 deletions lib/secure_compare.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule SecureCompare do
def compare(a, b) when is_nil(a) or is_nil(b), do: false
def compare(a, b) when byte_size(a) != byte_size(b), do: false
def compare(a, b) when is_binary(a) and is_binary(b) do
a_list = String.to_char_list(a)
b_list = String.to_char_list(b)
a_list = String.to_charlist(a)
b_list = String.to_charlist(b)

compare(a_list, b_list)
end
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule SecureCompare.Mixfile do
def project do
[
app: :secure_compare,
version: "0.0.2",
elixir: "~> 1.2",
version: "0.1.0",
elixir: "~> 1.3",
name: "secure_compare",
source_url: "git@github.com:plackemacher/secure_compare.git",
homepage_url: "https://github.com/plackemacher/secure_compare",
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
%{"earmark": {:hex, :earmark, "1.1.0", "8c2bf85d725050a92042bc1edf362621004d43ca6241c756f39612084e95487f", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.14.5", "c0433c8117e948404d93ca69411dd575ec6be39b47802e81ca8d91017a0cf83c", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]}}
%{"earmark": {:hex, :earmark, "1.2.3", "206eb2e2ac1a794aa5256f3982de7a76bf4579ff91cb28d0e17ea2c9491e46a4", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.16.2", "3b3e210ebcd85a7c76b4e73f85c5640c011d2a0b2f06dcdf5acdb2ae904e5084", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]}}

0 comments on commit ebc6d72

Please sign in to comment.