Skip to content

Commit 963f6e9

Browse files
committed
Fix crypto:start() deprecation warning
It's equivalent to `application:start(crypto)` Documented to work as such since 18.0 at least: https://www.erlang.org/docs/18/man/crypto#start-0
1 parent b91be5d commit 963f6e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/mochitemp.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ gettempdir_cwd_test() ->
195195
ok.
196196

197197
rngchars_test() ->
198-
crypto:start(),
198+
application:start(crypto),
199199
?assertEqual(
200200
"",
201201
rngchars(0)),
@@ -217,7 +217,7 @@ rngchar_test() ->
217217
ok.
218218

219219
mkdtemp_n_failonce_test() ->
220-
crypto:start(),
220+
application:start(crypto),
221221
D = mkdtemp(),
222222
Path = filename:join([D, "testdir"]),
223223
%% Toggle the existence of a dir so that it fails
@@ -264,7 +264,7 @@ make_dir_fail_test() ->
264264
ok.
265265

266266
mkdtemp_test() ->
267-
crypto:start(),
267+
application:start(crypto),
268268
D = mkdtemp(),
269269
?assertEqual(
270270
true,
@@ -275,7 +275,7 @@ mkdtemp_test() ->
275275
ok.
276276

277277
rmtempdir_test() ->
278-
crypto:start(),
278+
application:start(crypto),
279279
D1 = mkdtemp(),
280280
?assertEqual(
281281
true,

src/mochiweb_session.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ generate_check_session_cookie_test_() ->
168168
fun generate_check_session_cookie/1}.
169169

170170
setup_server_key() ->
171-
crypto:start(),
171+
application:start(crypto),
172172
["adfasdfasfs",30000].
173173

174174
generate_check_session_cookie([ServerKey, TS]) ->

0 commit comments

Comments
 (0)