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 committed Oct 25, 2024
1 parent 1092f04 commit c9f30d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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())
} else {
args <- vctrs::vec_recycle_common(prefix = prefix, range = range, suffix = suffix)
}
Expand Down
2 changes: 1 addition & 1 deletion man/starts_with.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9f30d3

Please sign in to comment.