Skip to content

Commit 394828d

Browse files
tak30elbrujohalcon
andauthored
RTI-13898: Using lists:enumerate instead of lists:zip(lists:seq(1, L), L) (#107)
* Using lists:enumerate instead of lists:zip(lists:seq(1, L), L) * Using lists:enumerate instead of lists:zip(lists:seq(1, L), L) * Reverting unneeded change --------- Co-authored-by: Brujo Benavides <elbrujohalcon@gmail.com>
1 parent d2e739f commit 394828d

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/erlang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
otp: ['23.3', '24.3', '25.2.1']
16+
otp: ['25.2.1']
1717
rebar: ['3.20.0']
1818

1919
steps:

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{erl_opts,
22
[warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}.
33

4-
{minimum_otp_vsn, "23"}.
4+
{minimum_otp_vsn, "25"}.
55

66
{cover_enabled, true}.
77

src/mero_conn.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ flush_all(Name, Timeout) ->
167167

168168
mset_(Name, KVECs, Timeout, Op) ->
169169
TimeLimit = mero_conf:add_now(Timeout),
170-
Requests =
171-
lists:zip(
172-
lists:seq(1, length(KVECs)), KVECs),
170+
Requests = lists:enumerate(KVECs),
173171
%% we number each request according to its original position so we can return results
174172
%% in the same order:
175173
NKVECs = [{N, Key, Value, ExpTime, CAS} || {N, {Key, Value, ExpTime, CAS}} <- Requests],

0 commit comments

Comments
 (0)