Skip to content

Commit 2791f01

Browse files
committed
refactor(as_slide_computation): quo conversion needs no ...
`... = missing_arg(); some_function(...)` will pass zero arguments to `some_function`, so we don't need to accept `...` in converted quosures.
1 parent 8c8bc52 commit 2791f01

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

R/grouped_epi_archive.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ grouped_epi_archive =
304304

305305
f = quos[[1]]
306306
new_col = sym(names(rlang::quos_auto_name(quos)))
307-
... = missing_arg()
307+
... = missing_arg() # magic value that passes zero args as dots in calls below
308308
}
309309

310310
f = as_slide_computation(f, ...)

R/slide.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ epi_slide = function(x, f, ..., before, after, ref_time_values,
363363

364364
f = quos[[1]]
365365
new_col = sym(names(rlang::quos_auto_name(quos)))
366-
... = missing_arg()
366+
... = missing_arg() # magic value that passes zero args as dots in calls below
367367
}
368368

369369
f = as_slide_computation(f, ...)

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ as_slide_computation <- function(f, ...) {
241241
# A quosure is a type of formula, so be careful with the order and contents
242242
# of the conditional logic here.
243243
if (is_quosure(f)) {
244-
fn = function(.x, .group_key, .ref_time_value, ...) {
244+
fn = function(.x, .group_key, .ref_time_value) {
245245
# Convert to environment to standardize between tibble and R6
246246
# based inputs. In both cases, we should get a simple
247247
# environment with the empty environment as its parent.

0 commit comments

Comments
 (0)