Skip to content

Commit 964e46d

Browse files
committed
remove quosure conversion in as_slide_computation
1 parent f93ef93 commit 964e46d

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

NAMESPACE

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,11 @@ importFrom(rlang,"!!")
9191
importFrom(rlang,.data)
9292
importFrom(rlang,.env)
9393
importFrom(rlang,arg_match)
94-
importFrom(rlang,call2)
9594
importFrom(rlang,caller_arg)
9695
importFrom(rlang,caller_env)
9796
importFrom(rlang,check_dots_empty0)
9897
importFrom(rlang,enquo)
9998
importFrom(rlang,enquos)
100-
importFrom(rlang,eval_tidy)
10199
importFrom(rlang,f_env)
102100
importFrom(rlang,f_rhs)
103101
importFrom(rlang,is_environment)
@@ -108,9 +106,6 @@ importFrom(rlang,is_quosure)
108106
importFrom(rlang,is_string)
109107
importFrom(rlang,missing_arg)
110108
importFrom(rlang,new_function)
111-
importFrom(rlang,pairlist2)
112-
importFrom(rlang,quo_get_env)
113-
importFrom(rlang,quo_get_expr)
114109
importFrom(rlang,quo_is_missing)
115110
importFrom(rlang,sym)
116111
importFrom(rlang,syms)

R/utils.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ assert_sufficient_f_args <- function(f, ..., n_mandatory_f_args = 2L) {
227227
#' h <- as_slide_computation(~ .x - .group_key)
228228
#' h(6, 3)
229229
#'
230-
#' @importFrom rlang check_dots_empty0 is_function is_quosure eval_tidy call2
231-
#' quo_get_env new_function pairlist2 f_env is_environment missing_arg f_rhs
232-
#' is_string quo_get_expr is_formula caller_arg caller_env
230+
#' @importFrom rlang check_dots_empty0 is_function new_function f_env
231+
#' is_environment missing_arg f_rhs is_string is_formula caller_arg
232+
#' caller_env
233233
as_slide_computation <- function(x,
234234
env = global_env(),
235235
...,
@@ -241,12 +241,6 @@ as_slide_computation <- function(x,
241241
return(x)
242242
}
243243

244-
if (is_quosure(x)) {
245-
mask <- eval_tidy(call2(environment), env = quo_get_env(x))
246-
fn <- new_function(pairlist2(... = ), quo_get_expr(x), mask)
247-
return(fn)
248-
}
249-
250244
if (is_formula(x)) {
251245
if (length(x) > 2) {
252246
rlang:::abort_coercion(

0 commit comments

Comments
 (0)