Skip to content

Commit

Permalink
Use edb_server_maps:add instead instead of double traverse
Browse files Browse the repository at this point in the history
Summary: Another occurrence of adding an element to a nested maps that we missed on the recent commit introducting this feature.

Reviewed By: lisztspace

Differential Revision: D68279787

fbshipit-source-id: d3c350e0eb85fc00518828629b819d9963bc6873
  • Loading branch information
Thibault Suzanne authored and facebook-github-bot committed Jan 16, 2025
1 parent cac2223 commit 728c220
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/edb_server_break.erl
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ add_explicit(Module, Line, Breakpoints0) ->
case add_vm_breakpoint(Module, Line, explicit, Breakpoints0) of
{ok, Breakpoints1} ->
#breakpoints{explicits = Explicits1} = Breakpoints1,
BreakpointInfos1 = maps:get(Module, Explicits1, #{}),
BreakpointInfos2 = BreakpointInfos1#{Line => []},
Explicits2 = Explicits1#{Module => BreakpointInfos2},
Explicits2 = edb_server_maps:add(Module, Line, [], Explicits1),
Breakpoints2 = Breakpoints1#breakpoints{explicits = Explicits2},
{ok, Breakpoints2};
{error, Reason} ->
Expand Down

0 comments on commit 728c220

Please sign in to comment.