Skip to content

Commit

Permalink
Only do bit64 check if bit64 installed (#209)
Browse files Browse the repository at this point in the history
A couple of packages (including httr2) use a hacky wrapper to avoid taking a dependency on bit64.

Part of #208
  • Loading branch information
hadley authored Nov 6, 2024
1 parent 9f9e931 commit d18c05a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/num_equal.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ num_equal <- function(x, y, tolerance = default_tol()) {
return(FALSE)
}

if (is_int64(x) || is_int64(y)) {
if ((is_int64(x) || is_int64(y)) && is_installed("bit64")) {
if (can_int64(x) && can_int64(y)) {
x <- bit64::as.integer64(x)
y <- bit64::as.integer64(y)
Expand Down

0 comments on commit d18c05a

Please sign in to comment.