Skip to content

Commit e85aae7

Browse files
mlechutopolarity
andcommitted
Apply suggestions from code review
Thanks! Co-authored-by: Cody Tapscott <[email protected]>
1 parent e1aaec5 commit e85aae7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compat.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ function collect_expr_parameters(e::Expr, pos::Int)
8383
params = expr_parameters(e, pos)
8484
isnothing(params) && return e.args
8585
args = Any[e.args[1:pos-1]..., e.args[pos+1:end]...]
86-
return _flatten_params(params, args)
86+
return _flatten_params!(args, params)
8787
end
88-
function _flatten_params(p::Expr, out::Vector{Any})
88+
function _flatten_params!(out::Vector{Any}, p::Expr)
8989
p1 = expr_parameters(p, 1)
9090
if !isnothing(p1)
9191
push!(out, Expr(:parameters, p.args[2:end]...))
92-
_flatten_params(p1, out)
92+
_flatten_params!(out, p1)
9393
else
9494
push!(out, p::Any)
9595
end
@@ -252,7 +252,7 @@ function _insert_convert_expr(@nospecialize(e), graph::SyntaxGraph, src::SourceA
252252
end
253253
elseif e.head === :for
254254
@assert nargs === 2
255-
child_exprs = [_to_iterspec([e.args[1]]), e.args[2]]
255+
child_exprs = Expr[_to_iterspec(Any[e.args[1]]), e.args[2]]
256256
elseif e.head === :where
257257
@assert nargs >= 2
258258
if !(e.args[2] isa Expr && e.args[2].head === :braces)

0 commit comments

Comments
 (0)