Skip to content

Commit d731089

Browse files
avoid setNames
1 parent cfd2352 commit d731089

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

R/backport_linter.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ backport_linter <- function(r_version = getRversion(), except = character()) {
4242

4343
backport_blacklist <- backports[r_version < R_system_version(names(backports))]
4444
backport_blacklist <- lapply(backport_blacklist, setdiff, except)
45-
backport_index <- stats::setNames(
46-
rep(names(backport_blacklist), times = lengths(backport_blacklist)),
47-
unlist(backport_blacklist)
48-
)
45+
backport_index <- rep(names(backport_blacklist), times = lengths(backport_blacklist))
46+
names(backport_index) <- unlist(backport_blacklist)
4947

5048
names_xpath <- "//SYMBOL | //SYMBOL_FUNCTION_CALL"
5149

0 commit comments

Comments
 (0)