Skip to content

Commit

Permalink
lint: uncomment redundant check for nicer organization
Browse files Browse the repository at this point in the history
`vec_size(x)` appears to do the same check and emit the same message (since we
also use the name `x`), but adding back the check doesn't seem to have a
noticeable impact on `as_epi_archive()` or `revision_summary()` performance, and
if an error is raised, it's probably nicer for the trace to point to dedicated
validation code.
  • Loading branch information
brookslogan committed Jan 9, 2025
1 parent a7b861e commit d5bc643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ removed_by_compactify <- function(df, keys, tolerance) {
#' @importFrom vctrs vec_c vec_slice vec_size
#' @export
vec_position_lag <- function(x, n) {
# obj_check_vector(x)
obj_check_vector(x)
assert_count(n)
if (length(x) == 0L) {
x
Expand Down

0 comments on commit d5bc643

Please sign in to comment.