Skip to content

Commit

Permalink
remove tiny file_init() overhead from calls to character()
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 3, 2025
1 parent 4be227a commit edb59d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/class_file.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
file_init <- function(
path = character(0),
stage = character(0),
path = character0,
stage = character0,
hash = NA_character_,
time = NA_character_,
size = NA_character_,
Expand Down
2 changes: 2 additions & 0 deletions R/utils_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ supported_args <- function(fun, args) {
tar_envir_base <- new.env(parent = baseenv())

tar_envir_empty <- new.env(parent = emptyenv())

character0 <- character(0L)

0 comments on commit edb59d6

Please sign in to comment.