Skip to content

Commit

Permalink
wa_raft_log: typing
Browse files Browse the repository at this point in the history
Summary:
the only call:

https://www.internalfb.com/code/fbsource/[ef7cc62e00978ad4c539a570e9f26927bb009601]/whatsapp/server/erl/wa_raft/src/wa_raft_log.erl?lines=534

the third parameter cannot be `infinity`

Differential Revision: D60904209

fbshipit-source-id: 69591db0ea993c1bced2c41d44a98638aa41533a
  • Loading branch information
ilya-klyuchnikov authored and facebook-github-bot committed Aug 7, 2024
1 parent f769c78 commit f412631
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wa_raft_log.erl
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ fold_impl(Log, First, Last, SizeLimit, Func, AccIn) ->
%% provider to the callback function.
-spec fold_terms(LogOrView :: log() | view(),
First :: log_index(),
Last :: log_index() | infinity,
Last :: log_index(),
Func :: fun((Index :: log_index(), Term :: log_term(), Acc) -> Acc),
Acc) ->
{ok, Acc} | wa_raft:error().
Expand All @@ -447,7 +447,6 @@ fold_terms(Log, First, Last, Func, Acc) ->
Provider = provider(Log),
LogFirst = Provider:first_index(Log),
LogLast = Provider:last_index(Log),
% eqwalizer:fixme - min [T166261957]
fold_terms_impl(Log, max(First, LogFirst), min(Last, LogLast), Func, Acc).

-spec fold_terms_impl(
Expand Down

0 comments on commit f412631

Please sign in to comment.