diff --git a/NAMESPACE b/NAMESPACE index 5437124cb0..e1c4ab5393 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -912,6 +912,7 @@ importFrom(magrittr,"%>%") importFrom(pkgconfig,get_config) importFrom(pkgconfig,set_config) importFrom(pkgconfig,set_config_in) +importFrom(rlang,"%||%") importFrom(rlang,.data) importFrom(rlang,.env) importFrom(rlang,check_dots_empty) diff --git a/R/igraph-package.R b/R/igraph-package.R index 2a948e1dec..07e28f7531 100644 --- a/R/igraph-package.R +++ b/R/igraph-package.R @@ -9,6 +9,7 @@ #' @importFrom rlang check_installed #' @importFrom rlang inject #' @importFrom rlang warn +#' @importFrom rlang %||% ## usethis namespace: end NULL diff --git a/R/utils.R b/R/utils.R index 70729f7ae3..a5469af9a8 100644 --- a/R/utils.R +++ b/R/utils.R @@ -41,19 +41,6 @@ add_class <- function(x, class) { x } -`%||%` <- function(lhs, rhs) { - lres <- withVisible(eval(lhs, envir = parent.frame())) - if (is.null(lres$value)) { - eval(rhs, envir = parent.frame()) - } else { - if (lres$visible) { - lres$value - } else { - invisible(lres$value) - } - } -} - `%&&%` <- function(lhs, rhs) { lres <- withVisible(eval(lhs, envir = parent.frame())) if (!is.null(lres$value)) {