Skip to content

Commit cc5eba3

Browse files
authored
Merge pull request #594 from JuliaSymbolics/b/replace_get!_with_get_to_avoid_unnecessary_initialization_of_state_values
Replace `get!` with `get` to avoid unnecessary initialization of state values
2 parents e39b109 + 5320dd7 commit cc5eba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ end
743743

744744
function cse_state!(state, t)
745745
!iscall(t) && return t
746-
state[t] = Base.get!(state, t, 0) + 1
746+
state[t] = Base.get(state, t, 0) + 1
747747
foreach(x->cse_state!(state, x), unsorted_arguments(t))
748748
end
749749

0 commit comments

Comments
 (0)