Skip to content

Commit 49fb39a

Browse files
TD5facebook-github-bot
authored andcommitted
Fold maps:values into comprehension
Summary: Comprehensions can operate over map values directly, so we can avoid an intermediate list. Differential Revision: D78552263 fbshipit-source-id: 48a220c9a18f01a92e4a943d88d2be5733f1208f
1 parent 096564b commit 49fb39a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wa_raft_snapshot_catchup.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ init_tables() ->
131131

132132
-spec handle_call(Request :: call(), From :: gen_server:from(), State :: #state{}) -> {noreply, #state{}} | {reply, term(), #state{}}.
133133
handle_call(?WHICH_TRANSPORTS, _From, #state{transports = Transports} = State) ->
134-
{reply, [ID || #transport{id = ID} <- maps:values(Transports)], State};
134+
{reply, [ID || _ := #transport{id = ID} <- Transports], State};
135135
handle_call(Request, From, #state{} = State) ->
136136
?RAFT_LOG_NOTICE("received unrecognized call ~P from ~0p", [Request, 25, From]),
137137
{noreply, State}.

0 commit comments

Comments
 (0)