Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Davis Vaughan <[email protected]>
  • Loading branch information
lionel- and DavisVaughan authored Oct 25, 2024
1 parent 1092f04 commit aaf7a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/helpers-pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ matches <- function(match,
#' a range of 2 gives "01", a range of three "001", etc.
#' @inheritParams rlang::args_dots_empty
#' @param cross Whether to take the cartesian product of `prefix`, `range`, and `suffix`.
#' If `FALSE`, the default, these arguments are recycled using tidyverse rules.
#' If `FALSE`, the default, these arguments are recycled using [tidyverse rules][vctrs::vector_recycling_rules].
#' @export
num_range <- function(prefix,
range,
Expand All @@ -189,7 +189,7 @@ num_range <- function(prefix,
vars <- vars %||% peek_vars(fn = "num_range")

if (cross) {
args <- vctrs::vec_expand_grid(prefix = prefix, range = range, suffix = suffix)
args <- vctrs::vec_expand_grid(prefix = prefix, range = range, suffix = suffix, .error_call = current_env())

Check warning on line 192 in R/helpers-pattern.R

View check run for this annotation

Codecov / codecov/patch

R/helpers-pattern.R#L192

Added line #L192 was not covered by tests
} else {
args <- vctrs::vec_recycle_common(prefix = prefix, range = range, suffix = suffix)
}
Expand Down

0 comments on commit aaf7a2c

Please sign in to comment.