File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,6 @@ defmodule Hashids do
179
179
defp parse_option! ( :alphabet , kw ) do
180
180
list = case Keyword . fetch ( kw , :alphabet ) do
181
181
:error -> @ default_alphabet
182
- # Deprecated. Left for compatibility with 1.0.
183
- { :ok , list } when is_list ( list ) -> list
184
182
{ :ok , bin } when is_binary ( bin ) -> String . to_char_list ( bin )
185
183
_ ->
186
184
message = "Alphabet has to be a string of at least 16 characters/codepoints."
@@ -194,8 +192,6 @@ defmodule Hashids do
194
192
defp parse_option! ( :salt , kw ) do
195
193
case Keyword . fetch ( kw , :salt ) do
196
194
:error -> [ ]
197
- # Deprecated. Left for compatibility with 1.0.
198
- { :ok , list } when is_list ( list ) -> list
199
195
{ :ok , bin } when is_binary ( bin ) -> String . to_char_list ( bin )
200
196
_ -> raise Hashids.Error , message: "Salt has to be a (possibly empty) string."
201
197
end
Original file line number Diff line number Diff line change @@ -38,9 +38,8 @@ defmodule HashidsTest.Helpers do
38
38
end
39
39
40
40
defp build_opts ( salt , min_len , alphabet ) do
41
- salt = String . to_char_list ( salt )
42
41
len = String . to_integer ( min_len )
43
- alphabet_opt = if alphabet == "" , do: [ ] , else: [ alphabet: String . to_char_list ( alphabet ) ]
42
+ alphabet_opt = if alphabet == "" , do: [ ] , else: [ alphabet: alphabet ]
44
43
alphabet_opt ++ [ salt: salt , min_len: len ]
45
44
end
46
45
You can’t perform that action at this time.
0 commit comments