Skip to content

Commit

Permalink
Merge pull request #178 from ariel-anieli/remove-random-uniform
Browse files Browse the repository at this point in the history
Replaced random_uniform/1 by rand:uniform/1
  • Loading branch information
ferd authored Jul 2, 2024
2 parents 3d0006f + 15126e0 commit 1fd0a51
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ec_file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ real_dir_path(Path) ->
%% function of the same name.
-spec insecure_mkdtemp() -> TmpDirPath::file:name() | {error, term()}.
insecure_mkdtemp() ->
UniqueNumber = erlang:integer_to_list(erlang:trunc(random_uniform() * 1000000000000)),
UniqueNumber = erlang:integer_to_list(erlang:trunc(rand:uniform() * 1_000_000_000_000)),
TmpDirPath =
filename:join([tmp(), lists:flatten([".tmp_dir", UniqueNumber])]),

Expand Down Expand Up @@ -376,9 +376,6 @@ sub_files(From) ->
{ok, SubFiles} = file:list_dir(From),
[filename:join(From, SubFile) || SubFile <- SubFiles].

random_uniform() ->
rand:uniform().

%%%===================================================================
%%% Test Functions
%%%===================================================================
Expand Down

0 comments on commit 1fd0a51

Please sign in to comment.