Skip to content

Commit

Permalink
Remove obsolete loop (#2505)
Browse files Browse the repository at this point in the history
Co-authored-by: Indrajeet Patil <[email protected]>
  • Loading branch information
MichaelChirico and IndrajeetPatil authored Dec 21, 2023
1 parent 34e1df1 commit 17c27e1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions R/get_source_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -640,18 +640,7 @@ fix_eq_assigns <- function(pc) {

for (i in seq_len(n_expr)) {
start_loc <- true_locs[i]

# TODO(michaelchirico): vectorize this loop away. the tricky part is,
# this loop doesn't execute on most R versions (we tried 3.6.3 and 4.2.0).
# so it likely requires some GHA print debugging -- tedious :)
end_loc <- true_locs[i]
j <- end_loc + 1L
# nocov start: only runs on certain R versions
while (j <= length(expr_locs) && !expr_locs[j]) {
end_loc <- j
j <- j + 1L
}
# nocov end

prev_loc <- prev_locs[start_loc]
next_loc <- next_locs[end_loc]
Expand Down

0 comments on commit 17c27e1

Please sign in to comment.