Skip to content

Commit

Permalink
some more tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Sep 27, 2024
1 parent 689f5a6 commit 4ae7c8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions R/call.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ renv_call_matches <- function(call, names, nargs = NULL) {

ok <- FALSE

if (is.call(call)) {
if (is.symbol(sym <- call[[1L]])) {
if (any(names == as.character(sym))) {
ok <- is.null(nargs) || length(call) == nargs + 1L
}
}
}
if (is.call(call) &&
is.symbol(sym <- call[[1L]]) &&
any(names == as.character(sym)))
ok <- is.null(nargs) || length(call) == nargs + 1L

ok

Expand Down
2 changes: 1 addition & 1 deletion R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ renv_dependencies_recurse_impl <- function(stack, object, callback, ...) {
# recurse
if (is.recursive(object))
for (i in seq_along(object))
if (!is.symbol(object[[i]]))
if (is.call(object[[i]]))
renv_dependencies_recurse_impl(stack, object[[i]], callback, ...)

}
Expand Down

0 comments on commit 4ae7c8e

Please sign in to comment.