Skip to content

Commit 0cca7a3

Browse files
committed
replace has_name()
1 parent 2e9b8c2 commit 0cca7a3

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

R/limits.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
lims <- function(...) {
8181
args <- list2(...)
8282

83-
if (!all(has_name(args))) {
83+
if (!is_named2(args)) {
8484
cli::cli_abort("All arguments must be named.")
8585
}
8686
env <- current_env()

R/utilities.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,6 @@ gg_dep <- function(version, msg) {
231231
invisible()
232232
}
233233

234-
has_name <- function(x) {
235-
nms <- names(x)
236-
if (is.null(nms)) {
237-
return(rep(FALSE, length(x)))
238-
}
239-
240-
!is.na(nms) & nms != ""
241-
}
242-
243234
# Use chartr() for safety since toupper() fails to convert i to I in Turkish locale
244235
lower_ascii <- "abcdefghijklmnopqrstuvwxyz"
245236
upper_ascii <- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

0 commit comments

Comments
 (0)