From f2e9be3517e3ae7463f39320440daf0ae01df496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 27 Jun 2024 17:17:08 +0200 Subject: [PATCH] chore: Use `check_installed()` --- R/api.R | 2 +- R/proto.R | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/R/api.R b/R/api.R index ca9a171..402ec90 100644 --- a/R/api.R +++ b/R/api.R @@ -179,7 +179,7 @@ format.profile_data <- function(x, ...) { #' dm::dm_draw(dm) dm_from_profile <- function(x) { stopifnot(inherits(x, "profile_data")) - stopifnot(rlang::is_installed("dm")) + check_installed("dm") samples <- x$samples locations <- x$locations diff --git a/R/proto.R b/R/proto.R index abf5ec1..9149fbf 100644 --- a/R/proto.R +++ b/R/proto.R @@ -1,8 +1,5 @@ provide_proto <- function() { - if (!is_installed("RProtoBuf")) { - abort("Package RProtoBuf is required to read pprof files.") - } - + check_installed("RProtoBuf") install_proto_files() }