Skip to content

Commit

Permalink
chore: Use check_installed()
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Jun 27, 2024
1 parent 8c7e1d2 commit 4d8e1b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ format.profile_data <- function(x, ...) {
#' }
dm_from_profile <- function(x) {
stopifnot(inherits(x, "profile_data"))
stopifnot(rlang::is_installed("dm"))
check_installed("dm")

samples <- x$samples
locations <- x$locations
Expand Down
5 changes: 1 addition & 4 deletions R/proto.R
Original file line number Diff line number Diff line change
@@ -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()
}

Expand Down

0 comments on commit 4d8e1b9

Please sign in to comment.