Skip to content

Commit ad1cac1

Browse files
Merge pull request #1215 from r-lib/use-stable-purrr
2 parents 3394099 + 9e9d8ec commit ad1cac1

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Depends:
2727
Imports:
2828
cli (>= 3.1.1),
2929
magrittr (>= 2.0.0),
30-
purrr (>= 0.2.3),
30+
purrr (>= 1.0.2),
3131
R.cache (>= 0.15.0),
3232
rlang (>= 1.0.0),
3333
rprojroot (>= 1.1),

R/compat-dplyr.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ lead <- function(x, n = 1L, default = NA) {
1010
c(x[-seq_len(n)], rep(default, n))
1111
}
1212

13-
14-
arrange <- function(.data, ...) {
15-
ord <- eval(substitute(order(...)), .data, parent.frame())
16-
vec_slice(.data, ord)
17-
}
18-
1913
arrange_pos_id <- function(data) {
2014
pos_id <- data$pos_id
2115
if (is.unsorted(pos_id)) {
@@ -51,9 +45,3 @@ left_join <- function(x, y, by) {
5145
last <- function(x) {
5246
x[[length(x)]]
5347
}
54-
55-
map_dfr <- function(.x, .f, ...) {
56-
.f <- purrr::as_mapper(.f, ...)
57-
res <- map(.x, .f, ...)
58-
vec_rbind(!!!res)
59-
}

R/visit.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,11 @@ enrich_terminals <- function(flattened_pd, use_raw_indention = FALSE) {
233233
groups <- flattened_pd$line1
234234
split_pd <- vec_split(flattened_pd, groups)[[2L]]
235235
flattened_pd <- split_pd %>%
236-
map_dfr(function(.x) {
236+
purrr::map(function(.x) {
237237
.x$col2 <- cumsum(.x$nchar + .x$lag_spaces)
238238
.x
239-
})
239+
}) %>%
240+
purrr::list_rbind()
240241
flattened_pd$col1 <- flattened_pd$col2 - flattened_pd$nchar
241242
flattened_pd
242243
}

0 commit comments

Comments
 (0)